[Xymon] http checks for multiple domains in the same server

Jeremy Laidman jlaidman at rebel-it.com.au
Thu Jun 27 05:17:05 CEST 2013


The dnsreg script runs server-side, so should go into server/ext/.

The answer to most "can I..." questions is "yes, it's open source".  ;-)
 Seriously though, you can certainly do an HTTP check daily if you like,
from an ext script, and setting the lifetime on your status messages to 24
hours so as to prevent purples after 5 minutes.  Something like this,
listed in tasks.cfg (or tasks.d/somefile.cfg) to run every day or whatever
you need:

#!/bin/sh
LIFETIME=24h
SITES="http://www.moo.com/this/that https://www.example.net/ ..."
FAILSITES=""; OKSITES=""
for SITE IN $SITES; do
    wget $SITE && OKSITES="$OKSITES $SITE" || FAILSITES="$FAILSITES $SITE"
done
if [ "$FAILSITES" ]; then
    $XYMON status+24h "$HOSTNAME.webchecks red `date` - failed one or more
web checks
These sites FAILED: $FAILSITES
These sites OK: $OKSITES"
else
    $XYMON status+$LIFETIME "$HOSTNAME.webchecks green `date` - all web
checks OK
Sites tested: $OKSITES"
fi

This lumps all tests into one status - adjust the "webchecks" hostname
accordingly if you want.

If you need to do per-site timing to go into RRD, it's a bit more
complicated but doable using the NCV technique.

If you're asking if you can do this kind of thing with the built-in net
checks, then I would think it's possible somehow, but you'd need to do
something a bit more fancy.  I'm thinking that you'd need to setup an
alternative instance of xymonnet using "--test-untagged" and "--validity"
flags and the XYMONNETWORK variable, and tagging hosts.cfg entries with
NET:location.  See the man page for xymonnet for more on this.

J




On 27 June 2013 04:32, David Hay-Currie <dhaycurrie at leisurefitness.com>wrote:

> We have a web server that has 7 web sites running, and about 100 domains.
> Most of the domains are in the same web site.****
>
> Currently I have listed the most of the important sites, and I am trying
> to also get dnsreg (more on that later).****
>
> What I would like to do, is run http check on these sites once a day, and
> not every day. Is it possible? Without changing the default http setting?
> (the top critical sites I want to check on default schedule)****
>
> ** **
>
> While I am on the domain topic, I recently moved the server from hobbit to
> xymon, but the package deleted most of the hobbit folders automatically and
> I don’t remember exactly which folders I had to put the dnsreg check. I
> though it was a server/ext but it is possible it is %XYMONHOME/client/ext?
> ****
>
> ** **
>
> *David Hay-Currie*****
>
> *IT Manager*****
>
> *Leisure Fitness Equipment LLC*****
>
> *231 Executive Dr. Suite 15*****
>
> *Newark, DE 19702*****
>
> *Phone: (302) 224-5018*****
>
> [image:
> http://www.leisurefitness.com/images/LF_4C_Logosig.png?referrer=dhaycurrie]<http://www.leisurefitness.com/?referrer=dhaycurrie>
> ****
>
> ** **
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130627/5cba6c6c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 9107 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130627/5cba6c6c/attachment.png>


More information about the Xymon mailing list