I've set "event_handler_DisableLoadBalancer" as the event handler for the service, and set it to "on".
The content of the event_handler_DisableLoadBalancer is "$USER1$/event_handler_DisableLoadBalancer.sh $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$"
The contents of the event_handler_DisableLoadBalancer.sh is:
Code: Select all
#!/bin/sh
#
# Event handler script for DisableLoadBalancer on testoe2016-1.iss.inter-state.com
# What state is the HTTP service in?
case "$1" in
WARNING)
/usr/local/nagios/libexec/check_nrpe -H testoe2016-1.iss.inter-state.com -p 5666 -c DisableLoadBalancer -a spooler
exit 0As you can see the code in event_handler_DisableLoadBalancer.sh references the specific machine (testoe2016-1.iss.inter-state.com) I want to trigger. I actually would prefer this be more generic and actually reference the hostname of the service so I use this script on any of my many hosts. But since I can't get this simple version to work I'm starting here.
Thanks for the assistance.