How to create multiple custum test under one column
thorsten.erdmann at daimler.com
thorsten.erdmann at daimler.com
Mon Dec 7 17:17:44 CET 2009
Hi,
I want to do some application tests on several servers. All these test
should be under one column named "app". Every test is unique for one
server. So test "app" on "server1" is different from "app" on server2. All
these test run remotely on the hobbit server, not on the destination
servers.
For now I wrote a test-script for every test and define a unique testname
for the bbhost file for every test-script. In the script I reported to the
"app" column. Works fine, but I have to include every test-script in the
hobbitlaunch file and so all these tests run simultaneously, resulting in
a big number of processes on the hobbit server.
So I think of writing _one_ testscript for the "app" test and let this
script decide which subscript should be run for each host. So all the
different tests would be run under one master test script and so I
hopefully get only one process.
BBHTAG=app # What we put in bb-hosts to trigger this test
COLUMN=app # Name of the column, often same as tag in
bb-hosts
TEMPFILE_OUTPUT=$BBTMP/$BBHTAG.output.tmp
TEMPFILE=$BBTMP/$BBHTAG.tmp
$BBHOME/bin/bbhostgrep $BBHTAG | while read L
do
echo "found hosts: $L"
rm $TEMPFILEOUTPUT >/dev/null 2>&1
set $L # To get one line of output from bbhostgrep
HOSTIP="$1"
MACHINEDOTS="$2"
MACHINE=`echo $2 | $SED -e's/\./,/g'`
COLOR=green
echo "Application test on $MACHINEDOTS" > $TEMPFILE
if "$MACHINE" == "server1"
. apptest_server1.sh
fi
if "$MACHINE" == "server2"
. apptest_server2.sh
fi
MSG=`cat $TEMPFILE_OUTPUT | fold -s -w 100`
if [ $DEBUG = TRUE ]
then
echo "status $MACHINE.$COLUMN $COLOR `date` $MSG"
else
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date` $MSG"
fi
rm $TEMPFILE_OUTPUT >/dev/null 2>&1
done
exit 0
What do you think of this method? Maybe you have a better idea?
Thank you
Thorsten Erdmann
If you are not the intended addressee, please inform us immediately that you have received this e-mail in error, and delete it. We thank you for your cooperation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20091207/4ee49e25/attachment.html>
More information about the Xymon
mailing list