BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} Notification Problems on Custom Test
I had a similar issue. If you are not using the bb client to send
the messages, you need to send the data twice.
Once with a "status" message
and
Again with a "page" message
I do this like this in a perl script:
#
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>;
if ( $Alert != 0 ) {
# and terminate the connection when we're done.
close($socket);
$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";
printf $socket "page %s.%s %s
%s\n","$Server","$TestJob","$StatusColor","$UnixDate";
}
# read the remote answer,
$answer = <$socket>;
# and terminate the connection when we're done.
close($socket);
At 01:52 PM 8/17/2006, dthacker9@cox.net wrote:
We're running bb-1.9e on both
client and servers.
We've build a custom test that runs on one of our client servers and
sends
a status message to the BBDISPLAY. The host is defined like
this
0.0.0.0 customtest.mydomain.com # noping noconn
discards
bbwarnrules looks like this:
customtest.mydomain.com;;discards;;0-6;0000-2359;
sysadmin@mydomain.com:10
The test is being received and displayed. When the status changes
it shows
up as an event on the event summary web page. The sysadmin@mydomain
address is working for other alarms. The bbwarnrules file passes a
bbchkwarnrules run cleanly. If I turn the alarm to red, I cannot
get a notification. If I do not update status for over 30 minutes,
I do get a purple notification. How does bbpage gather it's list of
items that need to be run through the bbwarnrules file? Where should I
look to make sure this red alarm is creating the correct "hook"
for bbpage to see and act on?
TIA DT
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to
mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index