Getting only unhandled services from JSON CGIs in Nagios Cor
Posted: Wed Mar 07, 2018 7:18 am
Hello everybody, I'm using the JSON Query Generator found in jsonquery.html in order to retrieve a list of the services that are in critical and warning states. I'm successfully able to obtain them, with the following call: https://...servername.../nagios/cgi-bin/statusjson.cgi?query=servicelist&servicestatus=warning+critical.
However, I only want to obtain the list of unhandled services that satisfy this condition.
Is there a way to do that? The task I want to accomplish is simple, I need to obtain pretty much the same information that's displayed on the Services (Unhandled) view of Nagios. The problem is that I will need that information in JSON and not in HTML format. That's why I'm thinking of using the JSON API for it.
Thank you all.
Regards
However, I only want to obtain the list of unhandled services that satisfy this condition.
Is there a way to do that? The task I want to accomplish is simple, I need to obtain pretty much the same information that's displayed on the Services (Unhandled) view of Nagios. The problem is that I will need that information in JSON and not in HTML format. That's why I'm thinking of using the JSON API for it.
Thank you all.
Regards