Hi
I have created one event handler for one of the services that i am monitoring. this is the event log
(for this post i have modified the service)
[04-15-2011 12:07:39] SERVICE EVENT HANDLER: Gssdev;Internet Explorer;CRITICAL;SOFT;2;start-testfile
[04-15-2011 12:07:39] SERVICE ALERT: Gssdev;Internet Explorer;CRITICAL;SOFT;2;iexplore.exe: not running
now start-testfile.sh does executes but due to user rights issue (i think), ubuntu does not allows it to continue.
i am able to execute this script from the terminal, but not through nagios
i have modified my sudoers file by adding these lines
nagios ALL=NOPASSWD: ALL
###and got this from another article, so i have added these lines also
User_Alias NAGIOS = nagios,nagcmd
Cmnd_Alias NAGIOSCOMMANDS = /sbin/service
Defaults:Nagios !requiretty
NAGIOS ALL=ALL NOPASSWD:NAGIOSCOMMANDS
now, just to check, i deleted my original code and entered this in start-testfile.sh
------------------
cd /tmp/
mkdir iexplore
exit 0
-------------------
after doing this, the script was creating a directory in tmp folder, but not anywhere else. so my guess is user rights is preventing the execution of the script…
Can you guys please suggest how can i run any type of script from the event handler…i have been trying since last 2 days…thank you
and also if you have any good article on event handlers and on their setup, please post the link
OS - Ubuntu 10.10