BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: {bb} Keeping a particular host/test combo from going purple -use "bbrefresh"
- To: <bb@bb4.com>
- Subject: RE: {bb} Keeping a particular host/test combo from going purple -use "bbrefresh"
- From: "Ruork, Robert" <RRuork@tusc.com.au>
- Date: Thu, 7 Oct 2004 09:01:39 +1000
- Content-class: urn:content-classes:message
- Content-transfer-encoding: 8bit
- Content-type: text/plain; charset="iso-8859-1"
- Reply-to: bb@bb4.com
- Sender: owner-bb@bb4.com
- Thread-index: AcSrLVb28xq9x8A9STeXGkg0JyvHWwAyqvqA
- Thread-topic: {bb} Keeping a particular host/test combo from going purple
Ben,
The following scripts (and recommendations therein) are the best option available. I have used it for many daily/weekly cron tasks pr other one-off tests.
It really does work.
Best of Luck.
Robert Ruork
"the manual said "requires Windows 200 or better"...so I installed Solaris"
==============================
#!/usr/local/bin/perl
# bbrefresh
# Written 6/2000 by Brion Moss <brion @ queeg.com>
#
# This script takes a hostname and a monitor name as argument and refresh
# the status. This is so you have a BB monitor that only runs a couple
# of times a day and not have it go purple.
#
# For example. you can have BB monitor to make sure that your nightly
# backups worked, but why have that monitor run every 5 minutes when
# you're checking on a once a day thing?
#
# Add the following to bb-network.sh:
#
# refresh* )
# SVCNAME=$1
# $BBHOME/bin/bbrefresh $FULLNAME $SVCNAME
# ;;
#
# then add lines to bb-hosts that look like
#
# 10.1.2.3 backuphost # telnet refresh:backupmon
my ($host,$monitor) = (@ARGV); # get arguments
$monitor =~ s/^refresh://;
$host =~ s/\./,/g;
my $BBHOME = $ENV{'BBHOME'}; $BBHOME ||= "/usr/local/bb";
my $BBDISP = $ENV{'BBDISP'}; $BBDISP ||= "localhost";
my $logdir = "$BBHOME/www/logs";
#print "Refreshing: $host $monitor\n";
# Scan the logs directory for the monitor to refresh
opendir(DIR,$logdir) || die "Can't read log directory $logdir: \n";
foreach $file (readdir(DIR)) {
if ($file eq "$host\.$monitor") {
my @log;
open(LOG,"$logdir/$file") || die "Can't read $logdir/$file: $!\n";
while (<LOG>) {
last if (/^Status unchanged in/);
push(@log,$_);
}
close LOG;
$log[0] =~ s/purple/green/;
$msg = "\"status $host.$monitor " . join('',@log);
$msg =~ s/\n+$//g;
$msg .= "\n\"\n";
system("$BBHOME/bin/bb $BBDISP $msg") &&
die "Can't run $BBHOME/bin/bb $BBDISP \"$msg\": $!\n";
last;
}
}
closedir DIR;
-----Original Message-----
From: Ben Pitzer [mailto:bpitzer@gmail.com]
Sent: Wednesday, 6 October 2004 8:21 AM
To: BB List
Subject: {bb} Keeping a particular host/test combo from going purple
Brothers,
I've got a test that I only need to run once per day. In the
meantime, I don't need that test going purple. Is there a way on a
host by host, test by test basis for me to keep this test from going
purple? I'd like it to just stay the reported color all day between
tests. Any suggestions?
I don't need the overkill of having all purples go away, I just want
these to stay green, red, yellow, or clear instead of going purple.
--
Regards,
Ben Pitzer
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
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.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
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