Global Event Handler Component
Posted: Wed Nov 11, 2015 4:02 am
I've configured a Service State Change Handler in the Global Event Handler component but I have not been able to make it work.
And yes I have enabled the Global event Handler (However Notifications are Disabled)
I have cut it down to an absolute basic script just to prove it
Nothing ever gets written to the log file
I can run the command manually and it works fine
I'm running NagiosXI 5R2.0
Any ideas .... Fred
And yes I have enabled the Global event Handler (However Notifications are Disabled)
Code: Select all
/usr/local/nagios/local/EventHandlers/Service.sh "%host%" "%service%"Code: Select all
# cat /usr/local/nagios/local/EventHandlers/Service.sh
#!/bin/sh
# Parameters passed by Nagios
# %host%
# %service%
host=${1}
service=${2}
DATE=`/bin/date`
echo $DATE,$host,$service >> /var/log/events/service-event.txtI can run the command manually and it works fine
Code: Select all
su - nagios -c "/usr/local/nagios/local/EventHandlers/Service.sh HOST-1 SERVICE-A"
# cat /var/log/events/service-event.txt
Wed Nov 11 16:48:47 WST 2015,HOST-1,SERVICE-A
Any ideas .... Fred