[Leaplist] 24-7 redundancy for poe folk

Jesse Goerz jgoerz at cfl.rr.com
Sun Jul 5 14:00:00 EDT 2009


On Thu, 2009-07-02 at 14:38 -0400, Randall Perry wrote:
> Howdy,Y'all
> I am in need of a shell script to do server monitoring.
...
> Now I have a need to help out some churche and not-for-profits with
> uptime issues.
> See, I manage these client servers spread geographically all over and
> sitting on cable, aDSL, shDSL, T1's.
> Sometimes their lines are not so reliable and their in-house hosted
> servers are not available to the outside world.
> I want to use DynDNS so that hostnames would shift to the up servers
> (and every server has a copy of all the websites).
> My idea was to have absolute availability for all these churches and
> not-for-profits without having to pay anyone to do it.
> They agree to host other sites and then they are hosted on the other
> sites as well.
> 
> So here is what I need:
> -monitor several servers by pinging public IP
> -check itself for Internet connectivity (like ping Google, Amazon,et
> al) to verify itself is up.
> -test that web pages are loading (optional)
> -send SMS text message to cell phone when site goes down and then when
> it comes back up (use email to sms gateway)
> -use dynamic DNS to change record to one of the up mirrors
> -do NOT send subsequent emails like 'system is up, system is up'...or
> repeats that it is down.
>  just set a flag on a file that gets ticked off or on (up/down) like
> an archive bit so that only a single email (and email to SMS)
>  gets sent to say 'server xxx is down'.
> -wash my car and apply good portion of carnuba wax
> -spell check carnuba wax.

If all you're interested in is the web sites, I would suggest not using
ping.  It's possible for a server to be up and be configured
incorrectly.  If you have other ports you're interested in, this
obviously doesn't apply.  However, it can be argued that any service
monitor should do just that, monitor the service, and nothing else.  If
you're monitoring multiple services, this might make it more
complicated.

If it is web only, use wget and look at the --spider option.  You could
create a page of "bookmarks" that are the servers you wish to check.
Instead of web addresses, use the IPs to avoid DNS problems giving you a
false positive.

This might give you some more ideas on how to implement it:
http://nostarch.com/download/cluster_ch06.pdf

hth,
Jesse


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Leaplist mailing list