Logstash http_poller pulling data recursively

Hi All,

I have to use logstash to pull metric data using ManageEngine AppManager's REST API. The task has to be done in two phases, the first phase would be to pull all objects/resource ids under a specific group using a URI endpoint like below.

https://[HOST]:[PORT]/AppManager/json/ListMonitorGroups?apikey=[API Key]&groupId=10000035

Next, task is that based on all the resource id's returned by the command above, loop over all the resource ids using a different URL endpoint like the one mentioned below.

https://[HOST]:[PORT]/AppManager/xml/ListMonitor?apikey=[API key]&resourceid=[ Resourceid ]

[ Resourceid ] will get replaced by resource id one by one and API call would be made.

I can use the http_poller to run the first phase and save the resource ids in a variable, however not sure how to achieve the second part.

Can someone help me with ideas on getting this done.

//Ankita Pachauri

If the resource ids are in an array then use a split filter to have one event per resource id and then use an http filter to do the second API call.

Thanks Badger, the resource ids are indeed in an array and split can be used. However, can you please share the sample configuration on how to use http filter recursively for multiple calls?

//Ankita Pachauri

I do not understand why you need recursion. The idea of using split is that each event has a single resource id so you can use a field reference in the http filter.

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