kiranilla
(Kiran)
November 15, 2017, 6:34am
1
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
kiranilla
(Kiran)
November 22, 2017, 1:47pm
2
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 }
}
2 Likes
system
(system)
Closed
December 20, 2017, 1:47pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.