InfluxDB input plugin for logstash

Hi,

As there is a output plugin for influxDB in Logstash (https://www.elastic.co/guide/en/logstash/current/plugins-outputs-influxdb.html), but not able to see any input plugin for it.
Could you please provide an way or alternative for connecting to influxDB as an input in Logstash.
Thanks in advance.

1 Like

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 }
}
1 Like

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