Codes in responses to Nagios Json

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Codes in responses to Nagios Json

Postby evisus » Mon Apr 29, 2019 12:20 pm

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

Re: Codes in responses to Nagios Json

Postby mcapra » Mon Apr 29, 2019 12:35 pm

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
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3587
Joined: Thu May 05, 2016 3:54 pm

Re: Codes in responses to Nagios Json

Postby evisus » Mon Apr 29, 2019 1:13 pm

Great!!!

that's what I was looking for, thanks for your help !!
evisus
 
Posts: 73
Joined: Tue Apr 26, 2016 1:19 pm

Re: Codes in responses to Nagios Json

Postby benjaminsmith » Mon Apr 29, 2019 1:28 pm

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!
User avatar
benjaminsmith
 
Posts: 1972
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Codes in responses to Nagios Json

Postby evisus » Mon Apr 29, 2019 1:33 pm

that's it, thanks to all
evisus
 
Posts: 73
Joined: Tue Apr 26, 2016 1:19 pm


Return to Nagios Core

Who is online

Users browsing this forum: Box293, Google [Bot] and 10 guests