--On Wednesday, March 31, 2004 8:20 AM -0500 Doug Williams <[EMAIL PROTECTED]> wrote:
I'm a newbie and am trying to figure out a way to use MON to perform automatic failover for a web server. Has anyone done this or something similar? We have web servers in separate locations, but don't do anything fancy with load balancing - we simply want to switch to server "2" in the alternate location in the event of a failure of server "1". We would like this failover to happen through DNS, meaning that if server "1" does fail we would automatically change the A record in our zone master to point to server "2", and then update any secondary DNS servers with that change. When server "1" is working again, the same process would happen in reverse.
I have http.monitor working but have now hit the wall.
Start by writing a stand alone script that can perform the change you need. I suggest using perl and Net::DNS::Update to send DDNS updates to your master. But if you're not using dynamic dns you'll need to come up with your own way to do it.
Then modify that script such that when called by mon as an alert it'll update the record to your backup machine, and when called as an upalert it'll update the record back.
-David
David Nolan <*> [EMAIL PROTECTED] curses: May you be forced to grep the termcap of an unclean yacc while a herd of rogue emacs fsck your troff and vgrind your pathalias!
_______________________________________________ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon