Xymon Mailing List Archive search

http checks for multiple domains in the same server

list Jeremy Laidman
Thu, 27 Jun 2013 13:17:05 +1000
Message-Id: <user-8b9c16745bfd@xymon.invalid>

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 <user-ab244b10c769@xymon.invalid>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*****

*XXX Executive Dr. Suite XX*****

*Newark, DE XXXXX*****

*Phone: (XXX) XXX-XXXX*****

[image:
http://www.leisurefitness.com/images/LF_4C_Logosig.png?referrer=dhaycurrie]<http://www.leisurefitness.com/?referrer=dhaycurrie>;
****

** **