# Redis - logstash - influxdb

**URL:** <https://discuss.elastic.co/t/redis-logstash-influxdb/78804>\
**Category:** Logstash\
**Created:** [March 16, 2017, 7:36am UTC](https://discuss.elastic.co/t/redis-logstash-influxdb/78804 "2017-03-16T07:36:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![azeiner](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@azeiner](https://discuss.elastic.co/u/azeiner)\
**Post date:** [March 16, 2017, 7:36am UTC](https://discuss.elastic.co/t/redis-logstash-influxdb/78804/1 "2017-03-16T07:36:59Z")

</div>

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=\>[]}, ..

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [March 16, 2017, 5:44pm UTC](https://discuss.elastic.co/t/redis-logstash-influxdb/78804/2 "2017-03-16T17:44:04Z")

</div>

Are you able to use the examples from the [influxdb docs](https://docs.influxdata.com/influxdb/v1.2/guides/writing_data/) 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?

---

<div class="post-metadata">

**Author:** ![azeiner](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@azeiner](https://discuss.elastic.co/u/azeiner)\
**Post date:** [March 16, 2017, 6:01pm UTC](https://discuss.elastic.co/t/redis-logstash-influxdb/78804/3 "2017-03-16T18:01:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 13, 2017, 6:01pm UTC](https://discuss.elastic.co/t/redis-logstash-influxdb/78804/4 "2017-04-13T18:01:14Z")

</div>

Closed on April 13, 2017, 6:01pm UTC

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