[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] running 2 --extra-script
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] running 2 --extra-script
- From: henrik (at) hswn.dk (Henrik Stoerner)
- Date: Tue, 17 May 2005 23:07:20 +0200
- References: <1116343612.7440.17.camel@viper.rhi.hi.is>
- User-agent: Mutt/1.5.6+20040907i
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