BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} Problem with sending email notification for specific trap
Thanks Phil,
I am using
a perl script that connects to the big brother port and sends the
data. Below is the code snippit (actually most of it).
this works to update the web page correctly.
Does the
request to send the page not then get generated on the server
side?
thanks,
Paul
my $USAGE = "
Usage: send2bb.pl [-h
hostname] [-p port] [-s server] [-j job] [-c color] [-m minutes] [-f
filename]|[-t \"data\"]
-h hostname hostname of the big brother
server
-p port port that the big
brother server listens on
-s server the server or test
type
-j job test or job
that is being reported
-c color status color of the
report - green/yellow/red
-m minutes number of minutes before the
report is considered old of invalid
-f filename the file name that contains the
report details
-t data quoted ascii
string to send
use either -f or -t
";
my $socket = IO::Socket::INET->new(PeerAddr => $remote_host,
PeerPort => $remote_port,
Proto => "tcp",
Type => SOCK_STREAM)
or die "Couldn't connect to
$remote_host:$remote_port : $!\n";
# send something over the socket,
#print $socket "status test.test green Wed Jul 13 09:53:07 EDT 2005
this is a test\n ";
if ( $TextData ) {
printf $socket "status+%s %s.%s %s %s
%s\n","$Delay","$Server","$TestJob","$StatusColor","$UnixDate","$TextData";
}
else {
printf $socket "status+%s %s.%s %s
%s\n","$Delay","$Server","$TestJob","$StatusColor","$UnixDate";
while (<INFILE>) {
chomp();
printf $socket "%s
\n","$_";
}
printf $socket "\n";
close(INFILE);
}
# read the remote answer,
my $answer = <$socket>;
# and terminate the connection when we're done.
close($socket);
The next most likely
source is the particular script you are using.
With a client-side test, it is the responsibility of the script to
actually generate the paging message. In order to help further, you
will need to let the list know which script you are using.
Cheers, Phil.
Home |
Main Index |
Thread Index