#!/bin/sh

# This is an example script for implementing simple redundancy.
# Read the HTML documentation on redundant monitoring for more
# information on what this does.

# Only take action on hard service states...
case "$2" in
HARD)
	case "$1" in
	CRITICAL)
		# The master NetSaint process is not running!
		# We should now become the master host and
		# take over the responsibility of monitoring
		# the network, so enter active mode...
		/usr/local/netsaint/libexec/eventhandlers/enter_active_mode
		;;
	WARNING)
	UNKNOWN)
		# The master NetSaint 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 NetSaint process running again!
		# We should go back to being the slave host, 
		# so enter standby mode...
		/usr/local/netsaint/libexec/eventhandlers/enter_standby_mode
		;;
	esac
	;;
esac
exit 0

 
