Event Handlers only run on UP or OK


#1

Hello all,

New forum member, long time Nagios user. I am having a problem with event handlers. Nagios is not running the specified event handler command when the state changes to CRITICAL or DOWN. Nagios does actually run the event handler command successfully when the state changes to OK or UP though. So, the handler runs when the service/host comes up every time - but never when it goes down.

This seems very strange to me - maybe I am missing something simple here? I have logged in as the nagios user and successfully run the handler program, so permissions are OK. Nagios version 1.4 on Debian Stable.

Thanks in advance.

Service Def:
define service{
use generic-service ; Name of service template to use
host_name DL-TEST
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 2
normal_check_interval 1
retry_check_interval 1
contact_groups ME
notification_interval 0
notification_period 24x7
notification_options u,c,r
check_command check_ping!100.0,20%!500.0,60%
event_handler DL-Port1
event_handler_enabled 1
}

Host Def:
define host{
use generic-host ; Name of host template to use
host_name DL-TEST
alias DL-TEST
address 192.168.1.124
check_command check-host-alive
max_check_attempts 20
notification_interval 60
notification_period 24x7
notification_options d,u,r
event_handler DL-Port1
event_handler_enabled 1
}

I have set:
enable_event_handlers=1
log_event_handlers=1

I have enabled event handler for the host and service separately in the web GUI.

I get these in the logs when state comes UP or OK:
SERVICE EVENT HANDLER: DL-TEST;PING;OK;HARD;1;DL-Port1
HOST EVENT HANDLER: DL-TEST;UP;HARD;1;DL-Port1

Nothing happens when it goes down (other than DOWN/CRITICAL alerts and contact notifications).


#2

Hi,

Have you resolved your issue? I seem to have the same issue as well. Event handler does not seem to execute.

Thanks