monit-general
[Top][All Lists]
Advanced

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

Re: [monit] How to Achieve "if x restarts within y cycles then exec ..."


From: Martin Pala
Subject: Re: [monit] How to Achieve "if x restarts within y cycles then exec ..."
Date: Fri, 27 Jun 2008 01:27:05 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080313 Iceape/1.1.9 (Debian-1.1.9-5)



Art Age Software wrote:
I would like to be able to execute an arbitrary action after a
specified number of restart attempts have failed. It appears that the
only thing allowed in the "if x restarts within y cycles" clause is
the timeout command. Is that true?

Yes, that's true. We plan to add this feature, there is also patch from Alec which implements it. I'll look on it and will try to integrate with upcoming monit 5.0.


Martin




In my case, what I am trying to achieve is a node failover (using
heartbeat) if mysql has crashed and cannot be restarted after several
attempts. Something like:

  if 5 restarts within 10 cycles then exec "/usr/lib/heartbeat/hb_standby"

What would be the best way to achieve this?

Thanks,

Sam


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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