Codes in responses to Nagios Json

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
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

Codes in responses to Nagios Json

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Codes in responses to Nagios Json

Post 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
Former Nagios employee
https://www.mcapra.com/
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

Re: Codes in responses to Nagios Json

Post by evisus »

Great!!!

that's what I was looking for, thanks for your help !!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Codes in responses to Nagios Json

Post by benjaminsmith »

Thanks @mcapra!

Did you have any other questions or may we close this thread?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

Re: Codes in responses to Nagios Json

Post by evisus »

that's it, thanks to all
Locked