Greetings,
I am having trouble with a Bash script that I wish to fire when a host goes down. Here is my config:
Win7 host defined with event_handler pointing to my defined command which is network-device-down. The command passes several macros to the Bash script. The main configuration file is set to allow event handlers.
To test my script as root:
>su nagios
>network-device-down.sh [and of course my args here]
[desired output]
User nagios obviously has permission to execute the script. I can run the script as user nagios if I'm logged into a shell as nagios. However, the nagios3 application which runs under nagios will not run the script.
Here is a portion of my nagios.log file:
[1273178544] HOST ALERT: Win7;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 3.66 ms
[1273178544] HOST EVENT HANDLER: Win7;(null);(null);(null);network-device-down
[1273178612] EXTERNAL COMMAND: SCHEDULE_FORCED_HOST_CHECK;Win7;1273178602
[1273178624] HOST ALERT: Win7;DOWN;HARD;1;PING CRITICAL - Packet loss = 100%
[1273178624] HOST EVENT HANDLER: Win7;(null);(null);(null);network-device-down
I am at a loss. The log seems to be telling me that nagios is indeed running my script; but I know that this is not the case. Does anyone have a suggestion for me?
Best regards,
Micheal