Event handlers not executing - Nagios 1.05b

Ethan Galstad nagios at nagios.org
Mon Sep 23 05:11:10 CEST 2002


If you had this service previously defined with the event handler 
disabled, chances are its still disabled.  This can happen if you 
have state retention enabled and non-status information for the 
service is being retained.  Check the web interface to see if the 
event handler is enabled or not.  I'm guessing its not.  

On 23 Sep 2002 at 21:40, C. Bensend wrote:

> 
> Hey folks,
> 
> 	I'm having a problem with a test installation of
> Nagios 1.05b.  It doesn't appear to be executing a custom
> event handler that I have defined.
> 
> nagios.cfg:
> 
> log_event_handlers=1
> enable_event_handlers=1
> 
> misccommands.cfg:
> 
> # 'qwest-event' command definition
> define command{
>         command_name    qwest-event
>         command_line    $USER1$/qwest-event
> }
> 
> hosts.cfg:
> 
> define host{
>         use                     generic-host
>         host_name               myrouter
>         parents                 routerparent
>         event_handler_enabled   1
>         event_handler           qwest-event
>         alias                   Router
>         address                 216.161.x.y
>         check_command           check-host-alive
>         max_check_attempts      10
>         notification_interval   120
>         notification_period     24x7
>         notification_options    d,u,r
>         }
> 
> 	I am seeing several events a day, where this router
> becomes unreachable, but the event handler is not executing.
> I have made sure that it is executable via the nagios user,
> and can write to the directory in the event handler:
> 
> 
> #!/bin/bash
> 
> # Script to document Qwest's routing problems
> # To be used with Nagios - as an event handler, it can track these
> # events automagically
> #
> # Benny, 9-2002
> 
> # What host are we tracing the route to?
> TARGET="216.161.x.y"
> 
> # Where is the traceroute binary?
> TRACEROUTE="/usr/sbin/traceroute"
> 
> # What options do we want for traceroute?
> TRACEROUTEOPT="-m 18 -n"
> 
> # Where do you want to dump the traces?
> LOGFILEDIR="/home/nagios/qwest/"
> 
> # What date format do you want to use for the traces?
> # Default:  09-08-2002_16:42:32 (M-D-Y_H:M:S)
> DATEFORMAT="+%m-%d-%Y_%H:%M:%S"
> 
> export TARGET TRACEROUTE TRACEROUTEOPT LOGFILEDIR DATEFORMAT
> 
> # For debugging purposes
> #echo "${TRACEROUTE} ${TRACEROUTEOPT} ${TARGET} > ${LOGFILEDIR}`date
> ${DATEFORMAT}`"
> DATE=`date ${DATEFORMAT}` ; export DATE
> echo "" > ${LOGFILEDIR}${DATE}
> echo `date ${DATEFORMAT}` >> ${LOGFILEDIR}${DATE}
> ${TRACEROUTE} ${TRACEROUTEOPT} ${TARGET} >>  \
>         ${LOGFILEDIR}${DATE}
> echo "" >> ${LOGFILEDIR}${DATE}
> 
> 
> 	Any thoughts, folks?  I would very much appreciate any
> hints.
> 
> Thanks!
> 
> Benny
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> "Now, to unleash screaming temporal doom!"
> --- Invader Zim
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 



Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list