# Logstash cannot connect to InfluxDB

**URL:** https://discuss.elastic.co/t/logstash-cannot-connect-to-influxdb/28608
**Category:** Logstash
**Created:** [September 3, 2015, 12:28pm UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-influxdb/28608 "2015-09-03T12:28:59Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kemra102](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@kemra102](https://discuss.elastic.co/u/kemra102)
#### Post date: [September 3, 2015, 12:28pm UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-influxdb/28608/1 "2015-09-03T12:28:59Z")

</div>

I am using the logstash-output-influxdb plugin to send some of our log data to InfluxDB. I have this configured like so:

```auto
influxdb {
        data_points => {
          "duration" => "%{data.event.duration}"
        }
        host => 'azsbgraph01'
        password => ''
        user => ''
        db => 'elk'
}

```

However I get an error in the Logstash logs when it tries to send data to InfluxDB:

```auto
2015-09-03_12:08:58.37375 {:timestamp=>"2015-09-03T12:08:58.373000+0000", :message=>"Error writing to InfluxDB", :response=>#<FTW::Response:0x667d0aa0 @reason="Not Found", @version=1.1, @headers=FTW::HTTP::Headers <{"content-type"=>"text/plain; charset=utf-8", "date"=>"Thu, 03 Sep 2015 12:08:58 GMT", "content-length"=>"19"}>, @body=<FTW::Connection(@13550) @destinations=["influxdb01:8086"] @connected=true @remote_address="192.168.0.1" @secure=false >, @logger=#<Cabin::Channel:0x3296ec91 @metrics=#<Cabin::Metrics:0xd9e0c98 @metrics_lock=#<Mutex:0x65beee4>, @metrics={}, @channel=#<Cabin::Channel:0x3296ec91 ...>>, @subscriber_lock=#<Mutex:0x57730158>, @level=:info, @subscribers={}, @data={}>, @status=404>, :response_body=>"404 page not found\n", :request_body=>"", :level=>:error}

```

Not sure where this is falling over, any pointers?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 4, 2015, 11:45pm UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-influxdb/28608/2 "2015-09-04T23:45:13Z")

</div>

Can you check your Influx logs to see if there is anything?

---

<div class="post-metadata">

### Author: ![NeckBeardPrince](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@NeckBeardPrince](https://discuss.elastic.co/u/NeckBeardPrince)
#### Post date: [October 13, 2015, 9:23pm UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-influxdb/28608/3 "2015-10-13T21:23:08Z")

</div>

Yeah something is screwy with the plugin, I did curl -i -XPOST '[http://10.0.0.100:8086/write?db=mydb](http://10.0.0.100:8086/write?db=mydb)' --data-binary 'cpu\_load\_short,host=server01,region=us-west value=0.64 1434055562000000000' and it worked fine. Nothing in the influxdb logs at all.

---

<div class="post-metadata">

### Author: ![rmoff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rmoff/32/20212_2.png) [@rmoff](https://discuss.elastic.co/u/rmoff)
#### Post date: [November 18, 2015, 2:32pm UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-influxdb/28608/4 "2015-11-18T14:32:47Z")

</div>

@NeckBeardPrince what version of InfluxDB are you running?

The API changed in 0.9, and if the logtash plugin is still using 0.8 API then you could hit this error (c.f. [https://github.com/influxdb/influxdb/issues/2032](https://github.com/influxdb/influxdb/issues/2032))

It looks like there's an outstanding PR on the plugin to make it 0.9 compatible: [https://github.com/logstash-plugins/logstash-output-influxdb/pull/29](https://github.com/logstash-plugins/logstash-output-influxdb/pull/29) (related issue: [https://github.com/logstash-plugins/logstash-output-influxdb/issues/24](https://github.com/logstash-plugins/logstash-output-influxdb/issues/24))

---

<div class="post-metadata">

### Author: ![maddipatla](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@maddipatla](https://discuss.elastic.co/u/maddipatla)
#### Post date: [February 17, 2016, 11:52pm UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-influxdb/28608/5 "2016-02-17T23:52:23Z")

</div>

I am using influxdb\_0.10.0-1 version. When i try to post a hardcoded value via my logstash.conf, it gives me Page not found error.  
My logstash.conf has following output section:  
output {  
influxdb {  
host=\>localhost  
password =\> "root"  
user =\> "root"  
db=\>"metrics"  
series=\>"processor"  
data\_points =\>{"value"=\>"0.7"}  
}

Any pointers in resolving this will be appreciated.

---

<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: [July 6, 2017, 5:10am UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-influxdb/28608/6 "2017-07-06T05:10:58Z")

</div>


