I installed Hobbit on my (former) BB server. The clients are reporting in normally. However, I have some tests for hosts (NetApp, Tandem - that have no BB client) that run on the BB server and use the bb executable to "trick" the server into thinking it received it from an external client. For example:
exec("/opt/bb/bin/bb", $IP, "status $machine.$test $color $now\n $status\n @array\n ") or die( "$1: Couldn't execute BB");
Is there an equivalent function on the Hobbit server that can accomplish this without having both BB and Hobbit installed?
On Thu, Jul 07, 2005 at 03:27:35PM -0500, Reif Jeffery M wrote:
I installed Hobbit on my (former) BB server. The clients are reporting in normally. However, I have some tests for hosts (NetApp, Tandem - that have no BB client) that run on the BB server and use the bb executable to "trick" the server into thinking it received it from an external client. For example:
exec("/opt/bb/bin/bb", $IP, "status $machine.$test $color $now\n $status\n @array\n ") or die( "$1: Couldn't execute BB");
Is there an equivalent function on the Hobbit server that can accomplish this without having both BB and Hobbit installed?
Hobbit comes with a "bb" binary that acts just like the Big Brother one. So your script should work just fine, although you may need to change that hard-coded path to /opt/bb/bin/bb (or setup links).
Regards, Henrik
On Thursday 7 July 2005 22:27, Reif Jeffery M wrote:
I installed Hobbit on my (former) BB server. The clients are reporting in normally. However, I have some tests for hosts (NetApp, Tandem - that have no BB client) that run on the BB server and use the bb executable to "trick" the server into thinking it received it from an external client. For example:
exec("/opt/bb/bin/bb", $IP, "status $machine.$test $color $now\n $status\n @array\n ") or die( "$1: Couldn't execute BB");
If you're using Perl, you can do without bb, e.g.:
use Sys::Hostname;
my $line = "status " . hostname . ".$BBTEST $color ";
$line .= scalar(localtime);
$line .= "\n$status\n at array\n";
use IO::Socket::INET;
my $bb = IO::Socket::INET->new("$BBHOST:$BBPORT");
if ( $bb and $bb->connected ) {
$bb->send($line);
$bb->shutdown(2);
}
else {
warn "error connecting to Big Brother (host $BBHOST, port $BBPORT)\n";
}
HTH, Paul
Please don't do that! The bb executable knows about multiple bb servers etc. Plea use exec(".../bb", $BBDISP, "...") and save any future users of your extension scripts a lot of headaches...
Eric
mail to : Eric.vdM at Softlution.com phone : +31 (0)40 235 0506 fax : +31 (0)40 235 0581
-----Original Message----- From: Paul van Eldijk [mailto:P.vanEldijk at uci.ru.nl] Sent: Friday, July 08, 2005 10:51 AM To: hobbit at hswn.dk Subject: Re: [hobbit] how to implement custom tests
On Thursday 7 July 2005 22:27, Reif Jeffery M wrote:
I installed Hobbit on my (former) BB server. The clients are reporting in normally. However, I have some tests for hosts (NetApp, Tandem - that have no BB client) that run on the BB server and use the bb executable to "trick" the server into thinking it received it from an external client. For example:
exec("/opt/bb/bin/bb", $IP, "status $machine.$test $color $now\n $status\n @array\n ") or die( "$1: Couldn't execute BB");
If you're using Perl, you can do without bb, e.g.:
use Sys::Hostname;
my $line = "status " . hostname . ".$BBTEST $color ";
$line .= scalar(localtime);
$line .= "\n$status\n at array\n";
use IO::Socket::INET;
my $bb = IO::Socket::INET->new("$BBHOST:$BBPORT");
if ( $bb and $bb->connected ) {
$bb->send($line);
$bb->shutdown(2);
}
else {
warn "error connecting to Big Brother (host $BBHOST, port
$BBPORT)\n"; }
HTH, Paul
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
participants (4)
-
eric.vdm@softlution.com
-
henrik@hswn.dk
-
P.vanEldijk@uci.ru.nl
-
ReifJefferyM@JohnDeere.com