[hobbit] Server side EXT script not running or appearing on web page

Mark Ashley mark at mark.com
Tue Jan 3 05:51:52 CET 2006


> http://hobbitmon.sourceforge.net/docs/hobbit-tips.html#scripts

I originally looked at that, I've since concluded it's dodgy documentation
in that it's not specific or complete. The first bit is for client side,
the server-side bit lacks the final steps.

Cheers,
Mark

Here's how to do it:

In ~/server/etc/hobbitlaunch.cfg add:

[NGssh]
     ENVFILE /home/hobbit/server/etc/hobbitserver.cfg
     NEEDS hobbitd
     CMD $BBHOME/ext/NGssh.sh
     LOGFILE $BBSERVERLOGS/NGssh.log
     INTERVAL 5m


In ~/server/ext/NGssh.sh add:

#!/bin/sh
BBHTAG=NGssh           # What we put in bb-hosts to trigger this test
COLUMN=NGssh    # Name of the column, often same as tag in bb-hosts
$BBHOME/bin/bbhostgrep $BBHTAG | while read L
do
   set $L    # To get one line of output from bbhostgrep
   HOSTIP="$1"
   MACHINEDOTS="$2"
   MACHINE=`echo $2 | $SED -e's/\./,/g'`
   MSG="$BBHTAG status for host $MACHINEDOTS"
   reply=`ssh $MACHINE -l hobbit /usr/ucb/whoami`
   if [ "$reply" = "hobbit" ]
   then
     COLOR=green
   else
     COLOR=red
   fi
   $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
   ${MSG}
   "
done
exit 0


In your ~/server/etc/bb-hosts add:

group-only conn|cpu|disk|info|memory|msgs|procs|NGssh|trends Campus
123.123.5.52 hostert # noping NGssh
123.123.1.12 hostick # noping NGssh
123.123.16.9 hostker # noping NGssh
123.123.3.11 hostel # noping NGssh
123.123.8.8 hostay # noping NGssh
123.123.5.49 hostmis # noping NGssh
123.123.3.17 hosteus # noping NGssh
123.123.1.11 hosty # noping NGssh
123.123.9.13 hostger # noping NGssh




More information about the Xymon mailing list