#!/bin/sh # Script by Georges Rosset # 20.01.2004 # Script to monitor Server Room Temperature. # ========================================== # logfile="/BB/bb19c/ext/tempLast4bb"; value=$( cat $logfile ); BBPROG=tempServer; export BBPROG TEST="temp" # BBHOME=/home/bb/bb; export BBHOME # FOR TESTING if test "$BBHOME" = "" then echo "BBHOME is not set... exiting" exit 1 fi if test ! "$BBTMP" then . $BBHOME/etc/bbdef.sh fi WARN="23" # GO YELLOW AT THIS LEVEL PANIC="25" # GO RED AND PAGE AT THIS LEVEL if test "$value" -ge "$PANIC"; then COLOR="red" elif test "$value" -ge "$WARN"; then COLOR="yellow" else COLOR="green" fi MACHINE="my_machine,my_domain,my_top_domain" LINE="status $MACHINE.$TEST $COLOR `date` Full Report Air Conditionning Emergency: call air_conditionning_support_number" $BB $BBDISP "$LINE" # # ==================================================================