my $bbhost = $ENV{BBHOST}; my $machine = `hostname`; chomp($machine); if ( -f $bbhost/etc/bbaliasname ) { # fetch aliasname and assign it to machine. } # $test would be the name of the test as BB displays it. my $test = "app"; # green, yellow and red are alert levels. my $color = 'green'; # # run test here, reset color if necessary # my $conn = new IO::Socket::INET ( PeerAddr => 'my_bb_server.domain.biz', PeerPort => '1984', Proto => 'tcp', ) || warn("Cannot create socket to port 1984 on localhost\n"); my $date = `date`; print $conn "status $machine.$test $color $date "; print $conn "test blah blah blah.\n"; print $conn "moretestinfo"; close($conn);