monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Forcing hb-standby with heartbeat when local process in not recoverable


From: Tim.Einmahl
Subject: Forcing hb-standby with heartbeat when local process in not recoverable
Date: Tue, 5 Dec 2006 12:48:47 +0100

Hello,

I have a question regarding the usage of monit and heartbeat.
The monit-readme contains the following statements :

 ... "With this sequence, there should be no error-case, which is
not handled either by heartbeat or by monit. For example, if monit dies,
initd restarts it. If heartbeat dies, monit restarts it. If the node
dies, the heartbeat instance on the other node detects it and restart
the services there."

But what happens, if a service ( for example Apache ) can't be restarted
locally by monit, because something went wrong with configuration files
etc ?
Then the service would not be accessible any more, because the virtual
address is
still on the failed node. Wouldn't it be a good idea to have something
like:

IF NUMBER RESTART NUMBER CYCLE(S) THEN ACTION, where ACTION could be
EXEC and not only TIMEOUT ?

Then it would be possible to exec "hb_standby" if Apache could not be
restarted for 3 times within 3 cycles

 check process apache
           with pidfile "/usr/local/apache/logs/httpd.pid"
           start program = "/etc/init.d/httpd start"
           stop program = "/etc/init.d/httpd stop"
           if 3 restarts within 3 cycles then exec
"/usr/lib/heartbeat/hb_standby"


Or is there a better way to achieve this ?

I know that heartbeat 2.x can do ressource monitoring, but I have to
rely on heartbeat 1.2.3 for several reasons.

Thanks for your help in advance

Best regards

Tim

           




 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]