[hobbit] URL Yellow verses Red
Ralph Mitchell
ralphmitchell at gmail.com
Fri Feb 2 19:48:45 CET 2007
On 2/2/07, James Wade <jkwade at futurefrontiers.com> wrote:
>
> Hello,
>
> On URL's, is there a way to say, turn them Yellow
>
> instead of Red?
>
>
>
> We have several development URL's and we want to
>
> monitor them, but don't want Hobbit showing them
>
> as Red, instead we'd like them to show Yellow.
>
> Is this possible?
You can always roll your own. I do that a lot... :) Something along
the lines of:
curl -o page.html http://server.domain.com
X=`grep -ic "Some Content" page.html`
if [ "$X" -gt "0" ]; then
COLOR=green
else
COLOR=yellow
fi
/home/hobbit/server/bin/bb 0.0.0.0 "status server,domain,com.home
$COLOR `date`"
You'll probably want a bit more fluff in that, such as some kind of
meaningful message in the last line, and I usually include an href to
the original URL so the monitoring guys can just click through it.
You can also add a link to "page.html" if you store it somewhere in
your server DocumentRoot, but that can get complicated if it contains
relative urls.
I'm sure a Perl guru could give you something simpler, but I never did
get the hang of perl.
Ralph Mitchell
More information about the Xymon
mailing list