Getting only unhandled services from JSON CGIs in Nagios Cor

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
lucasalvarezlacasa
Posts: 1
Joined: Wed Mar 07, 2018 7:08 am

Getting only unhandled services from JSON CGIs in Nagios Cor

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Getting only unhandled services from JSON CGIs in Nagios

Post by scottwilkerson »

This is currently not possible, but you could make a feature request here
https://github.com/NagiosEnterprises/nagioscore/issues
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked