BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

{bb} External Scripts in BB



Hello Brothers,

I have set up a bunch of new tests for big brother and I thought I had
taken of all the details but I must be missing something and all my
reading of the BB manual (section 3.7) is not helping much.

The scripts are for environmental monitors that we have established
throughout our office. For example, tor-office-temp~temp looks something
like this:

BBPROG=temperature.sh
TEST="temperature"
jsname="-t"
 if [ $ObservedTemp -lt $CriticalLow ] ; then
  COLOR="red"
elif [ $ObservedTemp -lt $WarnLow ] ; then
  COLOR="yellow"
elif [ $ObservedTemp -lt $WarnHigh ] ; then
  COLOR="green"
elif [ $ObservedTemp -lt $CriticalHigh ] ; then
  COLOR="yellow"
else
  COLOR="red"
fi
export BBPROG
HTMLOUT="<P align=center> <b>Environmental Conditions</b>"
JSName=$MN$DOMAIN~$jsname.js
HTMLOUT="$HTMLOUT <script language=\"JavaScript\" src=\"../$JSName\">"
HTMLOUT="$HTMLOUT</script> </P>"
LINE="status tor-cr-temp,domain,tld.$TEST $COLOR `date +%c`
$HTMLOUT"
$BB $BBDISP "$LINE"

I removed a lot of the initialization and the like to improve
readability, but this is a pretty good summary of one of my scripts.

To summarize my script, if I add the following:
LINE="status $MACHINE.$TEST $COLOR `date +%c`
$HTMLOUT"
echo XXXXXXXXXXXXXXXXXXXXXX
echo LINE:
echo $LINE
echo XXXXXXXXXXXXXXXXXXXXXX
$BB $BBDISP "$LINE"

I see the following:

XXXXXXXXXXXXXXXXXXXXXX
LINE:
status mlmc-mon,domain,tld.temperature green Thu 07 Jul 2005 04:25:14 PM
EDT <P align=center> <b>Environmental Conditions</b> <script
language="JavaScript" src="../tor-cr-temp.mlmc.com~-t.js"></script> </P>
XXXXXXXXXXXXXXXXXXXXXX

In the svcerrlist section of bbwarnsetup I have added a token:
temperature:490

In my bb-hosts file I have the following entry:
<IP address>  tor-cr-temp.domain.tld    # tor-cr-temp~temp
tor-cr-temp~humid

In my bb-bbexttab I have:
localhost : : tor-office-temp~temp;300
localhost : : tor-office-temp~humid;300

Yet on the BigBrother main page I get my device name,
tor-cr-temp.domain.tld and a "-" under both the humidity and temperature
columns, no status indicators. What am I forgetting? Any suggestions
welcome.

Thanks brothers,

Michael

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index