Page 1 of 1

Getting only unhandled services from JSON CGIs in Nagios Cor

Posted: Wed Mar 07, 2018 7:18 am
by lucasalvarezlacasa
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

Re: Getting only unhandled services from JSON CGIs in Nagios

Posted: Wed Mar 07, 2018 11:11 am
by scottwilkerson
This is currently not possible, but you could make a feature request here
https://github.com/NagiosEnterprises/nagioscore/issues