JSON CGIs "status"
Posted: Sun Sep 07, 2014 3:20 pm
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?
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?