Redis - logstash - influxdb

i've got a redis db, logstash and both elasticsearch an influxdb. i'm transferring keys from redis to elasticsearch, which works fine and want to test influxdb which does not work at all.

has anybody a valid connector for influxdb or how should i provide the data in redis to make this thing work?

this is my influx-db connection which only raises errors

influxdb {
host => "localhost"
measurement => "sensor1"
allow_time_override => true
use_event_fields_for_data_points => true
exclude_fields => ["@version", "@timestamp", "sequence", "type", "host"]
}

this is my redis connection which works fine

redis
{
host => "localhost"
data_type => "list"
key => "vortex"
threads => 4
type => "testrecord"
codec => "plain"
}

i tried this line format

"sensor1,measure=1 1489594615.9747" as list for redis e.g

key: vortex

values:
sensor1,measure=1 1489594615.9747
sensor1,measure=1 1489594615.9747
sensor1,measure=1 1489594615.9747
sensor1,measure=1 1489594615.9747
sensor1,measure=1 1489594615.9747

but this also doesn't work.

has anybody a clou how to get data from redis via logstash into influxdb?

EDIT

Errorlog
Redis {:identity=>"redis://@localhost:6379/0 list:vortex"}
17:45:01.044 [[main]-pipeline-manager] INFO logstash.pipeline - Pipeline main s
tarted
17:45:01.107 [Api Webserver] INFO logstash.agent - Successfully started Logstas
h API endpoint {:port=>9600}
{
"@timestamp" => 2017-03-15T16:45:07.794Z,
"@version" => "1",
"message" => "foo=12 bar=1 time=1489596313.9358",
"type" => "testrecord"
}
{
"@timestamp" => 2017-03-15T16:45:07.795Z,
"@version" => "1",
"message" => "foo=12 bar=2 time=1489596313.9681",
"type" => "testrecord"
}
{
"@timestamp" => 2017-03-15T16:45:07.795Z,
"@version" => "1",
"message" => "foo=12 bar=3 time=1489596313.9694",
"type" => "testrecord"
}
{
"@timestamp" => 2017-03-15T16:45:07.795Z,
"@version" => "1",
"message" => "foo=12 bar=4 time=1489596313.9703",
"type" => "testrecord"
}
{
"@timestamp" => 2017-03-15T16:45:07.796Z,
"@version" => "1",
"message" => "foo=12 bar=5 time=1489596313.9711",
"type" => "testrecord"
}
17:45:07.881 [[main]>worker6] ERROR logstash.outputs.influxdb - Error writing to
InfluxDB {:response=>#<Manticore::Response:0x438b35d8 @message="Bad Request", @
callback_result="{"error":"unable to parse 'sensor 1489596307794': invalid f
ield format"}\n", @handlers={:success=>#<Proc:0x4abde8a@C:/tools/logstash-5.2.2
/vendor/bundle/jruby/1.9/gems/manticore-0.6.1-java/lib/manticore/response.rb:36>
, :failure=>#<Proc:0x7a9482e2@C:/tools/logstash-5.2.2/vendor/bundle/jruby/1.9/ge
ms/manticore-0.6.1-java/lib/manticore/response.rb:37>, :cancelled=>#<Proc:0x60ab
5d9d@C:/tools/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/manticore-0.6.1-java/l
ib/manticore/response.rb:38>, :complete=>[]}, ..

Are you able to use the examples from the influxdb docs to post the Redis values directly?

Using Wireshark, what does the logstash influxdb output put in the influxdb write API call?
How is it different from a successful curl based API call?

thanks for the reply, we could post the values using an api call although we are using redis as the first instance of datacollector and therefore we are buffering data there for other systems too. influxdb would be some kind of alternative timeseries-db since it should perform a lot better than elastic. unfortunatly it's a little fiddly to configure and the data inside the db as expected!
we solved a few issues for now but now all fields are created as "string" inside the measure.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.