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

Server side EXT script not running or appearing on web page



Hi,

I'm trying to replace the inbuilt SSH test with one that does something
intelligent and have put this into ~hobbit/server/ext:

hobbit% cat server/ext/NGssh
#!/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" ]
    COLOR=green
  else
    COLOR=red
  fi
  $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
      ${MSG}
      "
done
exit 0



Then the script is added to bb-hosts:

hobbit% grep NGssh ~hobbit/server/etc/bb-hosts
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


What else needs to be done to action this script? The script doesn't seem to be running and nothing is appearing in a column. Scripts from the deadcat site mention a BBEXT variable but it's not in any of the hobbit config files.

Thanks,
Mark
mark (at) mark.com