LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Real Server Admin Tools?

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Real Server Admin Tools?
From: Graeme Fowler <graeme@xxxxxxxxxxx>
Date: Wed, 4 May 2005 10:01:49 +0100
On Tue 03 May 2005 21:40:42 BST , Joe Stump <joe@xxxxxxxxxxxx> wrote:
What I'd like is something that will allow me to do the following (for now):
1.) Monitor load on the servers (connections and actual load)

Configure snmpd on each machine to do just that, then poll it remotely with the collector of your choice - I'd recommend Cacti for its' "touch-free" nature after being installed, being entirely web-based.

2.) Restart Apache after I've made a change

On each realserver, run a script something like this from cron every <period>:

#!/bin/sh
#
# check httpd.conf for changes and gracefully restart Apache

CONF="/path/to/nfs/mount/httpd.conf"
OLDCONF="/path/to/tmp/dir/on/realserver"
HOSTNAME=`hostname`

DIFF=`diff -u $OLDCONF $CONF 2>&1>/dev/null`
RC=$?

if [ $RC -eq 1 ]
then
 cp $CONF $OLDCONF
 echo "Restarting Apache process on $HOSTNAME"
 apachectl graceful
elsif [ $RC -eq 2 ]
 echo "Problems found doing file diff on $HOSTNAME, bailing out..."
 exit
fi


It means that you move the intelligence out to your Apache servers, so if one of them is down you don't have a central control agent hanging up trying to reach a problem server. You can extend that logic further to monitor load also, especially if your servers are doing one job:

"If my 5 min load average exceeds THRESHOLD, stop Apache and flag to the admin"

Clearly if the load average is sky high you could hit a problem running this check, but then if it's that high you probably couldn't login from your management station anyway...

HTH

Graeme


<Prev in Thread] Current Thread [Next in Thread>