network testing tool for single host/service
Hi Henrik,
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:
$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?
Thanks for your reply.
Dominique
Dominique Frise a écrit :
Hi Henrik,
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:
$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?
Hi Dominique
you can use this :
$ /BB/hobbit/server/bin/bbcmd bbtest-net hades 2006-03-13 09:13:47 Using default environment file /BB/hobbit/server/etc/hobbitserver.cfg
All the parameters (like "--debug", to see the results before their transmission to hobbitd) can be added :
$ /BB/hobbit/server/bin/bbcmd bbtest-net hades --debug 2006-03-13 09:14:46 Using default environment file /BB/hobbit/server/etc/hobbitserver.cfg Command: bbtest-net 'hades' '--debug' Environment BBLOCATION='' Environment CONNTEST='TRUE' Environment IPTEST_2_CLEAR_ON_FAILED_CONN='TRUE' [...] 2006-03-13 09:14:47 Calc content color host hades : 2006-03-13 09:14:47 Flushing combo message status hades.ssh green <!-- [flags:OrdastILe] --> Mon Mar 13 09:14:46 2006 ssh ok status hades.ftp green <!-- [flags:OrdastILe] --> Mon Mar 13 09:14:46 2006 ftp ok status hades.http green Mon Mar 13 09:14:46 2006: OK
Regards,
--
Frédéric Mangeant
Steria EDC Sophia-Antipolis
Frédéric Mangeant wrote:
Dominique Frise a écrit :
Hi Henrik,
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:
$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?
Hi Dominique
you can use this :
$ /BB/hobbit/server/bin/bbcmd bbtest-net hades 2006-03-13 09:13:47 Using default environment file /BB/hobbit/server/etc/hobbitserver.cfg
All the parameters (like "--debug", to see the results before their transmission to hobbitd) can be added :
$ /BB/hobbit/server/bin/bbcmd bbtest-net hades --debug 2006-03-13 09:14:46 Using default environment file /BB/hobbit/server/etc/hobbitserver.cfg Command: bbtest-net 'hades' '--debug' Environment BBLOCATION='' Environment CONNTEST='TRUE' Environment IPTEST_2_CLEAR_ON_FAILED_CONN='TRUE' [...] 2006-03-13 09:14:47 Calc content color host hades : 2006-03-13 09:14:47 Flushing combo message status hades.ssh green <!-- [flags:OrdastILe] --> Mon Mar 13 09:14:46 2006 ssh ok status hades.ftp green <!-- [flags:OrdastILe] --> Mon Mar 13 09:14:46 2006 ftp ok status hades.http green Mon Mar 13 09:14:46 2006: OK
Regards,
Thanks Frédéric, but how can you test ftp service only on hades?
Dominique
Dominique Frise a écrit :
Frédéric Mangeant wrote:
Thanks Frédéric, but how can you test ftp service only on hades?
IMO you can test a single host, but with all the tests declared for this host.
--
Frédéric Mangeant
Steria EDC Sophia-Antipolis
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:
$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
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:
$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
participants (3)
-
Dominique.Frise@unil.ch
-
frederic.mangeant@steria.com
-
henrik@hswn.dk