Page 1 of 1

Codes in responses to Nagios Json

Posted: Mon Apr 29, 2019 12:20 pm
by evisus
Regards!

I have searched the documentation but I have not gotten an answer to my question.

Where can I see the meaning of the codes that return Json messages from Nagios Core?

For example, when executing "Json Query Status" I have, among other results, the values:
"status": 16
"state_type": 1,
"check_type": 0,
"last_hard_state": 2
etc....

What does "16" mean in the "status" field? (and other values, not only that)

I appreciate your help

Re: Codes in responses to Nagios Json

Posted: Mon Apr 29, 2019 12:35 pm
by mcapra
What's the exact query you're running? Documentation around those results is a bit sparse.

For service/host status mappings, those can be found here:
https://github.com/NagiosEnterprises/na ... #L143-L159

Many of those fields, like last_hard_state, check_type, state_type, etc are best described in the NDOUtils data model documentation:
https://assets.nagios.com/downloads/nag ... _Model.pdf

Re: Codes in responses to Nagios Json

Posted: Mon Apr 29, 2019 1:13 pm
by evisus
Great!!!

that's what I was looking for, thanks for your help !!

Re: Codes in responses to Nagios Json

Posted: Mon Apr 29, 2019 1:28 pm
by benjaminsmith
Thanks @mcapra!

Did you have any other questions or may we close this thread?

Re: Codes in responses to Nagios Json

Posted: Mon Apr 29, 2019 1:33 pm
by evisus
that's it, thanks to all