BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} External Script and blue color
- To: bb@bb4.com
- Subject: Re: {bb} External Script and blue color
- From: Jeff Stoner <leapfrog@freeshell.org>
- Date: Thu, 6 Jul 2006 22:44:57 +0000 (UTC)
- Content-type: TEXT/PLAIN; charset=US-ASCII; format=flowed
- In-reply-to: <1151349408.4287.37.camel@carter.pythonesque.net>
- References: <31596271.1151316115685.JavaMail.www@wwinf4106> <1151349408.4287.37.camel@carter.pythonesque.net>
- Reply-to: bb@bb4.com
- Sender: owner-bb@bb4.com
On Mon, 26 Jun 2006, Philip Clark wrote:
First the caveat. I don't recall ever having to do this, it is just
an opinion. There may be some "elephant traps" ahead that I'm not
seeing.
Agree. This falls outside BB's philosophy of "look but don't touch." Cave
Canum.
I think that I would favour the "short circuit" method. Just make a
change to your script so that, prior to performing the test, it queries
the current test status. Then, if the test is currently disabled, the
script can exit without performing the test.
If the script is running on your BB server, you would be able to
access the required file directly. Otherwise, if the script runs
Last time I looked, each host-service log file had these columns:
text-day
text-month
number-day(blank padded)
time(24-hour format)
year(4-digit)
color
epoch-time
duration(in seconds)
You only need to examine the last line and it should not have a duration
since that color is the most recent. Parsing the line is an exercise left
to the reader. If the color is blue, abort running the test. If it's any
other color, continue as required.
on a client, you would probably have to query the status over HTTP.
In either case, I'd try and start the test again before the disabled
status is due to expire, to ensure that you don't end up with
unnecessary "purples".
I wrote a cgi script that accomplishes just this in a very easy-to-parse
format. Search for "host_status" on deadcat.net and you'll find it. Just
remember, each test that does this puts an extra hit on your web server
every 5 minutes...and cgi scripts written in shell aren't very efficient.
--Jeff
"I am not available for comment"
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
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