Event Handlers
Sean Dilda
agrajag at dragaera.net
Thu Jul 22 19:58:40 CEST 2004
On Thu, 2004-07-22 at 11:02, Chris Purcell wrote:
> I'm having a problem getting Nagios to execute any event handlers when a
> service or host goes down. As a test, I wrote a Perl script called
> nagios_test.pl that will simply email me a short message each time its
> run. The event handler never runs when the host goes down...
>
> hosts.cfg
>
> define host{
> use generic-host
> host_name fake_server
> alias Fake Non-existent Server
> address 192.0.99.101
> parents cat4506
> }
>
>
> services.cfg
>
> define service{
> use generic-ping
> host_name fake_server
> event_handler event_handler_testing
> }
>
>
> checkcommands.cfg
>
> define command{
> command_name event_handler_testing
> command_line /usr/local/nagios/libexec/nagios_test.pl
> $SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$
> }
>
>
> I get a notification from Nagios when the host goes down, but the event
> handler perl script never runs at all.
You have the event handler defined for the service, not the host. I
can't find any clarification in the documentation, however I would not
be surprised if service event handlers are not run when the host goes
down (much like service notifications don't happen when a host goes
down).
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list