event handler script not executing

Mark Elsen mark.elsen at gmail.com
Wed Mar 10 16:46:35 CET 2010


> Hi all:
>
> Got Nagios core 3.2.0 on CentOS5. Been trying to get an event handler to execute
> but it will not. My configs;
>
> define service{
>    use                               local_service
>    host_name                    my_host
>    service_description         NFS Check
>    check_period                  24x7
>    check_interval                20
>    max_check_attempts     4
>    check_command            check_nrpe!check_nfs_mounts
>    event_handler_enabled    1
>    event_handler
> remount-nfs!$SERVICESTATE$!$SERVICESTATETYPE$!$SERVICEATTEMPT$
>    notification_period           24x7
>    notification_interval          120
>    contact_groups              colorado
> }
>
> define command{
>    command_name            remount-nfs
>    command_line               $USER1$/eventhandlers/remount-nfs $SERVICESTATE$
> $SERVICESTATETYPE$ $SERVICEATTEMPT$
> }
>
> enable_event_handlers=1 in the nagios.cfg file
>
> The script itself is very simple. At CRITICAL/SOFT/3 and CRITCAL/HARD/4 the
> script will execute. Running at command line as UID=nagios it runs fine.
> sudo is configured and nagios can mount NFS.
>
>
> The entry in the nagios.log
> [1268099555] SERVICE_EVENT_HANDLER: my_host;NFS
> CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3
>
> I have followed the process through and it will not execute the remount-nfs
> event handler command.
>
> All perms, dir & file, have been checked. Everything else is working as it
> should including the $SERVICE* macros. Just the script is not being executed.
>
> What is missing?
>

           Check nagios event log or nagios.log 'physically' for
starters, to check if the event handler is being launched.

M.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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