Page 1 of 1

JSON CGIs "status"

Posted: Sun Sep 07, 2014 3:20 pm
by CraigNYC
I'm sorry if this is a stupid question, but I've looked in the docs to no avail.

I'm trying to extract data from a Nagios 4.0.8 installation with the JSON CGIs. I've been experimenting with the built-in Query Generator and I'm successfully able to parse the JSON data from my external application.

The problem I'm running into is the "status" field when doing a host or service query. I'm seeing status codes like this:

"data": {
"host": {
"name": "myhost.com",
"plugin_output": "CRITICAL - Host Unreachable (10.0.1.113)",
"long_plugin_output": "",
"perf_data": "",
"status": 4,

And on some services, I'm seeing:
"status": 16,

I've looked in the Nagios docs and I'm only seeing four plugin return codes: 0, 1, 2, and 3.

Where is the JSON status cgi pulling these status numbers from and where can I find a list?

Re: JSON CGIs "status"

Posted: Mon Sep 08, 2014 3:34 pm
by sreinhardt
Well thats an interesting find! Could I ask that you post this as an issue on github @ https://github.com/NagiosEnterprises/nagioscore This way the core developers will be made aware of it right away. So far I don't see any commits matching this issue, so probably something brand new they are unaware of.