Hi
I have logstash input like below, how can i set variable for "cpu" (it is name of table in database) and it has different values like "mem, disk,i/o,...".
need to pass name of table as variable instead of define multi input. is it possible in logstash?
input {
http_poller {
urls => {
test1 => {
method => get
url => "http://192.168.1.1:8086/query?pretty=true&q=SELECT+*+FROM+cpu%20WHERE%20time%20%3E%20now()%20-%201m&db=monitoringdb"
headers => {
Authorization => "Token "
}
}
}
schedule => { cron => "* * * * * GMT"}
request_timeout => 60
codec => "json"
metadata_target => "http_poller_metadata"
}
}