[hobbit] network testing tool for single host/service

Dominique Frise Dominique.Frise at unil.ch
Mon Mar 13 11:14:38 CET 2006


Henrik Stoerner wrote:
> On Mon, Mar 13, 2006 at 09:11:45AM +0100, Dominique Frise wrote:
> 
>>Using Big Brother for several years, we wrote quite a few custom 
>>server/side scripts where we used bbnet tool from BB.
>>This utility allowed us to test a single host/service pair on the command 
>>line.
>>
>>Example:
>>
>>URL=http://test.example.com
>>
>>$BBHOME/bin/bbnet $URL > $BBTMP/HTTP_$PROC$$
>>
>>Your -definitely better- tool bbtest-net is bounded to $BBHOSTS and it does 
>>not seem possible to test a single host/service like above.
>>A hack could be to redefine $BBHOSTS with a single entry before calling 
>>bbtest-net.
>>I there another possibility to to this?
> 
> 
> I don't understand what it is you're trying to do. If you've written
> a script which essentially just checks a URL, then why can't you just
> use the normal Hobbit network tester ?
> 
> Even if your script does some checking on the content of the data
> it gets back, you should be able to do that just as easily with 
> Hobbit's built-in content checks.
> 
> As Frederic wrote, you can test a single host with the Hobbit network
> tester by passing the hostname on the command line. If you just want
> to see the test result (without sending it to the Hobbit server), you
> can run it as
> 
>    bbcmd bbtest-net --no-update my.host.name
> 
> The only reason I can think of, is if you want to check the results
> of the network tests before putting them into the bb-hosts file.
> This can be done with the following script:
> 
> #!/bin/sh
> echo "0.0.0.0 testhost # noconn $*" >/tmp/bbh.tmp
> bbcmd sh -c "BBHOSTS=/tmp/bbh.tmp BBTMP=/tmp bbtest-net --no-update testhost"
> rm /tmp/bbh.tmp
> exit 0
> 
> e.g. save it as check.sh, then run
> 
>     check.sh http://test.example.com/
> 
> 
> Regards,
> Henrik
> 
> 
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
> 
> 
> 
>
We used that kind of test to be able to take -besides regular BB alerting- 
automated actions after a failure of service on a particular host. For example, 
we have automated software failover capabilities for services -like http or 
ldap- that can be handled by two different servers.


Dominique



More information about the Xymon mailing list