Page 1 of 1

Nagios objectjson.cgi notification_options value

Posted: Mon May 13, 2019 5:36 am
by davide.galletti.75
Hi All,

I'm using the objectjson.cgi page to generate a report for all our services and all their details.

When comming up to the notification_options field a get a number, instead would have expected a string (same as cfg file).
If this is the correct behavior, how should these values be decoded ?

Thanks
Davide

Re: Nagios objectjson.cgi notification_options value

Posted: Mon May 13, 2019 4:53 pm
by cdienger
This is expected. For hosts this breaks down to:

Down =2
Unreachable = 4
Recovery = 1
Flapping = 2048
Scheduled Downtime = 4096

and for services:

Waring = 2
Critical = 4
Unknown = 8
Recovery = 1
Flapping = 2048
Scheduled Downtime = 4096

Values are summed if multiple options are selected.

Re: Nagios objectjson.cgi notification_options value

Posted: Fri Jun 28, 2019 5:39 am
by davide.galletti.75
Thanks!

Re: Nagios objectjson.cgi notification_options value

Posted: Fri Jun 28, 2019 1:38 pm
by cdienger
Glad to help. Locking.