[clue] Downtime.
David L. Willson
DLWillson at TheGeek.NU
Thu Sep 4 11:29:06 MDT 2014
If it was a static page, you could check the md5sum, too.
If the whole site was static, you could md5sum the whole site.
Then, you'd get a beacon every time anything changed: site down, or content change.
beacon is the new bacon.
--
David L. Willson
Teacher, Engineer, Evangelist
RHCE+Satellite CCAH Network+ A+ Linux+ LPIC-1 UbuntuCP NovellCLA
Mobile 720-333-LANS(5267)
http://sofree.us
This is a good time for a r3VOLution.
----- Original Message -----
> It seems like you'd want something that checked the page from
> outside. If you scripted something and set it up as a cron, you'd
> only find out about it if the server was otherwise functional. I can
> set up a check on my Nagios server, though there might be gratis
> services on the Internet that do that. If so, I haven't found any.
> If you're interested, the simple check that I usually use to check
> sites looks like this (Nagios is CRITICAL on exit 2, OK on exit 0):
> #!/bin/bash
> Catch() {
> code=$1
> message=$2
> if [[ $code -ne 0 ]]
> then
> echo "ERROR: $message. Returned $code"
> exit 2
> fi
> }
> url='http://<some page on my site>'
> string='<some string that's on my page when it's working>'
> contents=$(curl -s $url)
> Catch $? "Could not connect to $url"
> echo "$contents" | grep "$string" > /dev/null
> Catch $? "Couldn't find $string in $url"
> echo "OK: Found $string in $url"
> exit 0
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20140904/099d3885/attachment.html
More information about the clue
mailing list