Page 1 of 1

Event Handlers show enabled in XI, but are not in core

Posted: Fri Jan 18, 2019 1:38 pm
by andrewatmacys
We discovered a few days ago that for many of our hosts were not sending host alerts, and upon further investigation the CCM showed that the event handler was set to SKIP. However, it took some time to find this because XI showed that the event handler was enabled in the advanced tab on the host.

Is there a way to just force all event handlers to be ON in the config file? We want them all to stay on, and we're not quite sure what turned them off.

Re: Event Handlers show enabled in XI, but are not in core

Posted: Fri Jan 18, 2019 2:32 pm
by ssax
By default SKIP will inherit from any templates that have those settings defined so it was likely disabled on a template that was applied to the hosts.

In your /usr/local/nagios/etc/nagios.cfg you should have this by default:

Code: Select all

enable_event_handlers=1
Event Handler Option

Format: enable_event_handlers=<0/1>
Example: enable_event_handlers=1

This option determines whether or not Nagios will run event handlers when it initially (re)starts. If this option is disabled, Nagios will not run any host or service event handlers. Note: If you have state retention enabled, Nagios will ignore this setting when it (re)starts and use the last known setting for this option (as stored in the state retention file), unless you disable the use_retained_program_state option. If you want to change this option when state retention is active (and the use_retained_program_state is enabled), you'll have to use the appropriate external command or change it via the web interface. Values are as follows:

0 = Disable event handlers
1 = Enable event handlers (default)
Taken from here:

https://assets.nagios.com/downloads/nag ... gmain.html

The specific setting on the hosts/services for the event handler are just related to whether you want that specific host/service to run the event handler command that is defined on the host/service (if you defined it) and should NOT affect the sending of notifications (I labbed it up and validated it).

Please PM me a copy of your profile, you can download it from Admin > System Profile > Download Profile.

Let me know the specific host/services you made changes to so that I can see where the event handler was disabled (either via the configs or a template) .