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

Dan Vande More bigdan at gmail.com
Tue Jan 3 03:37:31 CET 2006


You shouldn't add external tests to bb-hosts. You add them to etc/bb-bbexttab.

-Dan

$ head -30 etc/bb-bbexttab
# bb-bbexttab: configuration file for launching external scripts
#
# Format:
#
#    host: misc settings : external scripts list
#    localhost: misc settings : external scripts list
#    : misc settings : external scripts list
#
#    host can be FQDN (fully qualified domain name) or
#       just a plain hostname but it is preferred that you
#       use a FQDN.
#    localhost: using this specifies that the scripts
#       specified on the line are to be launched on all clients
#
#    The same host can be specified on multiple lines to aid readability
#
#    Misc settings field is unimplemented ...
#        For future use...
#
#    You can override the default sleep between cycles
#      by addding a time qualifier to the script:
#      e.g.: localhost: script1;600
#      **NOTE** The sleep delimiter in BBEXT of bbdef.sh was
#               ':' (script1:600) but here it is ';'
#               in order to keep the same format as the
#               other bb-*tab files (the : is used to delimit
#               file entry fields in all bb-*tab files) .
#               The time qualifier is specified in SECONDS
#

On 1/2/06, Mark Ashley <mark at mark.com> wrote:
> 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
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>



More information about the Xymon mailing list