Logstash logic to filter jenkins json metrics

I want to filter and send jenkins metrics timer data in my logstash conf file. Can someone help me with what should i write in the filter block. So far my logstash conf file contains the below code

I want get all the data in timer, see image below:

My code is as follows:

input {
http_poller {
urls => {

test1 => {
# Supports all options supported by ruby's Manticore HTTP client
method => get
url => "http://url/metrics/currentUser/metrics"
headers => {
Accept => "application/json"
}
}
}
request_timeout => 29

schedule => { cron => "* * * * * UTC"}
codec => "json"

}
}

filter {
json {
source => "timers"
target => "timers"
}
}

output {
elasticsearch {
hosts => ["localhost:9200"]
index => "final"

}
stdout { }
}

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