monit-general
[Top][All Lists]
Advanced

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

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


From: Art Age Software
Subject: [monit] How to Achieve "if x restarts within y cycles then exec ..."
Date: Thu, 26 Jun 2008 14:55:44 -0700

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?

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




reply via email to

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