/usr/share/nagios3/plugins/eventhandlers/redundancy-scenario1/handle-master-proc-event is in nagios3-common 3.5.1-1ubuntu1.3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | #!/bin/sh
# REDUNDANCY EVENT HANDLER SCRIPT
# Written By: Ethan Galstad (egalstad@nagios.org)
# Last Modified: 05-30-2006
#
# This is an example script for implementing redundancy.
# Read the HTML documentation on redundant monitoring for more
# information on what this does.
# Location of the echo and mail commands
echocmd="/bin/echo"
mailcmd="/usr/bin/mail"
# Location of the event handlers
eventhandlerdir="/usr/share/nagios3/plugins/eventhandlers"
# Only take action on hard service states...
case "$2" in
HARD)
case "$1" in
CRITICAL)
# The master Nagios process is not running!
# We should now become the master host and
# take over the responsibility of monitoring
# the network, so enable active checks...
`$eventhandlerdir/enable_active_service_checks`
;;
WARNING|UNKNOWN)
# The master Nagios process may or may not
# be running.. We won't do anything here, but
# to be on the safe side you may decide you
# want the slave host to become the master in
# these situations...
;;
OK)
# The master Nagios process running again!
# We should go back to being the slave host,
# so disable active checks
`eventhandlerdir/disable_active_service_checks`
;;
esac
;;
esac
exit 0
|