[hobbit] running 2 --extra-script

Henrik Stoerner henrik at hswn.dk
Tue May 17 23:07:20 CEST 2005


On Tue, May 17, 2005 at 03:26:52PM +0000, Jon Bjorn Njalsson wrote:
> 
> This morning I was running successfully with one custom rrd graph. I
> then added another in hobbitlaunch.cfg like this 
> 
> [larrdstatus]
>         ENVFILE /usr/local/hobbit/server/etc/hobbitserver.cfg
>         NEEDS hobbitd
>         CMD hobbitd_channel --channel=status --log=$BBSERVERLOGS/larrd-
> status.log hobbitd_larrd --rrddir=$BBVAR/rrd --extra-
> script=/usr/local/hobbit/server/ext/exchange.sh --extra-tests=exchdb --
> extra-script=/usr/local/hobbit/server/ext/informix.sh --extra-
> tests=informix 
> 
> and the informix script works fine but the first one stopped graphing
> just about the time I added the second one. Is it not possible to run 2
> custom scripts or am I doing something wrong ?

No, but it is very simple to have your script distinguish between the
different status messages it can receive. Just build it like this:

HOSTNAME="$1"
TESTNAME="$2"
FILENAME="$3"

case "$TESTNAME" in)
   "informix")
   	# Do the informix stuff
	;;
   "exchdb")
   	# Do the exchange stuff
	;;
esac


Henrik




More information about the Xymon mailing list