[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Failing, and then failing back
From: |
Eric Pailleau |
Subject: |
Re: Failing, and then failing back |
Date: |
Mon, 02 Aug 2010 15:03:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100422 Mandriva/3.0.4-0.4mdv2009.1 (2009.1) Thunderbird/3.0.4 |
check host machine1 address machine1.example.org
<http://machine1.example.org>
if failed host machine1 port 80 protocol http
then exec "/usr/local/bin/set-alias.sh -a master -h machine2
&& touch /var/tmp/failover "
else if succeeded then exec "/usr/bin/test -f /var/tmp/failover && (/usr/local/bin/set-alias.sh -a master -h machine1 && rm -f
/var/tmp/failover) || /bin/true "
check host machine2 address machine2.example.org
<http://machine2.example.org>
if failed host machine2 port 80 protocol http
then exec "/usr/local/bin/set-alias.sh -a master -h
machine1"
Le 02/08/2010 14:22, Craig Box a écrit :
Hi guys,
When you use Heartbeat, you can specify that one server is the master -
if it goes down, it will fail the service over to the secondary, but
when the master returns, it will
I am replicating something like this in monit - we have a DNS CNAME
pointing to machine1, and if a service on machine1 isn't responding, it
sets the CNAME to machine2 and reloads the zone.
check host machine1 address machine1.example.org
<http://machine1.example.org>
if failed host machine1 port 80 protocol http
then exec "/usr/local/bin/set-alias.sh -a master
-h machine2"
check host machine2 address machine2.example.org
<http://machine2.example.org>
if failed host machine2 port 80 protocol http
then exec "/usr/local/bin/set-alias.sh -a master
-h machine1"
However, when machine1 comes back up, it won't automatically become the
master again - only when web2 fails.
Is there an easy way to cause this "fail back" scenario in monit?
Cheers
Craig
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
--
Salutations - Best regards - mit freundlichen Grüssen
----------------- address@hidden ------------------------------------
fr - Merci d'utiliser cette addresse pour le support ou question technique
en - Please use this address for any support or technical question
----------------- https://support.numlog.fr --------------------------------
fr - Privilégier la gestion de ticket d'incident (Clients NUMLOG)
en - Prefere our trouble ticket application (NUMLOG's customers)