[sysmon-help] spawn when a services comes backup
simon at mtds.com
Fri Dec 13 14:02:41 EST 2002
13-Dec-02 at 08:28, James T. Moore (email@example.com) wrote :
> I would like to use sysmon to monitor the web sites
> because the www monitoring option could be used
> to check the web sites and report failure if the machine
> is totally dead or is experiencing application failure
> (i.e. an error page is returned that does not contain
> the string sysmon is looking for).
> When a failure is detected I would like to trigger a script
> that removes the ip address of the failed server
> from the dns record and adds an iptables rule
> to dnat all web traffic to the failed server over to one
> of the working servers.
> It would be nice if I could also trigger a rule to add
> the failed ip back into the dns record and remove the
> ip tables rule when the service comes backup.
How about scripting this yourself with wget? wget can retrieve the page,
use grep to check for the string, and then run failover if grep returns
Then, keep this running and if grep then shows a match, run another
Sysmon could do this if it returned environment variables or something
similar, so that you could see if the host is down or up.
Otherwise, set sysmon output to a textfile and awk/grep for up or down
so that you can do this.
Several ways to skin this cat.
|-Simon White, Internet Services Manager, Certified Check Point CCSA.
|-MTDS Internet, Security, Anti-Virus, Linux and Hosting Solutions.
|-MTDS 14, rue du 16 novembre, Agdal, Rabat, Morocco.
|-MTDS tel +212.3.767.4861 - fax +212.3.767.4863
More information about the Sysmon-help