# InfluxDB input plugin for logstash

**URL:** <https://discuss.elastic.co/t/influxdb-input-plugin-for-logstash/107670>\
**Category:** Logstash\
**Created:** [November 15, 2017, 6:34am UTC](https://discuss.elastic.co/t/influxdb-input-plugin-for-logstash/107670 "2017-11-15T06:34:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kiranilla](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@kiranilla](https://discuss.elastic.co/u/kiranilla)\
**Post date:** [November 22, 2017, 1:47pm UTC](https://discuss.elastic.co/t/influxdb-input-plugin-for-logstash/107670/2 "2017-11-22T13:47:10Z")

</div>

I have got some other approach for connecting to **influxDB as an input plugin** :

```
input {
  http_poller {
    urls => {
      cpu => {
        user => " *****"
        password => " *****"
        url => "http://localhost:8086/query?pretty=true&db=inspectit&q=SELECT+*+FROM+cpu"
        headers => {
          Accept => "application/json
        }
     }  
    }
 }
}

filter {
split {
    field => "results"
}
split {
    field => "[results][series]"
}
split {
    field => "[results][series][values]"
	
	
}
if[name]== "cpu"
{
	ruby 
	{

	 #event.set(event.get("[results][series][columns][0]"),event.get("[results][series][values][0])")
	  code => '
				
				 event.set(event.get("[results][series][columns][0]"),event.get("[results][series][values][0]"))
	
  '

	}
}
output{
 
stdout { codec => rubydebug }
}
```

---

_[View the full topic](https://discuss.elastic.co/t/influxdb-input-plugin-for-logstash/107670)._
