Hello,
I have an http_poller working and getting me an array of JSON structures.
Is it possible in logstash to loop through one of the fields and for each one run a second http_poller?
For example, let's say my structure has a "City" field. I would like to run a second REST API for each city. Can it be done without hitting ruby coding? or if I must use ruby - can you point me in the right direction on how ruby does JSON parsing?
Or for ruby, how do I extract the "City" value from this json structure and then call a second http_poller with that value as part of my URL?
{
"City" : "Frankfurt",
"Population" : "12345",
"Some stat" : "10"
},
{
"City" : "New York",
"Population" : "123456",
"Some stat" : "100"
}
HTTP poller will run for each city in the "loop":
...
URL => { "https://...../%[current_city_field]" }
...
Thanks in advance !
JD