[Top][All Lists]

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

Re: [monit] How to Reset Monit's Cycle Counters?

From: Martin Pala
Subject: Re: [monit] How to Reset Monit's Cycle Counters?
Date: Fri, 4 Jul 2008 00:03:50 +0200

Yes, it should be possible to port the patch to 4.10.1 easily.

Diffs (for 5.0):


On Jul 3, 2008, at 11:47 PM, Art Age Software wrote:

Thank you very much - this is great! Can this change be patched into
4.10? Or will I need to update to the 5.0 beta?


On Thu, Jul 3, 2008 at 1:43 PM, Martin Pala <address@hidden> wrote:

i have modified the stop and unmonitor actions to cleanup the event state.
You can get the source code from CVS:



On Jul 2, 2008, at 3:32 AM, Art Age Software wrote:

I have a service that looks something like this:

check file some-file with path /var/run/check.tmp
start program = "/bin/touch /var/run/check.tmp"
mode manual
every 2 cycles
if changed timestamp 5 times within 10 cycles then exec "/some/script"
if 10 restarts within 20 cycles then timeout

I would like to find some way of resetting monit's check on the
timestamp after the exec "/some/script" occurs. Currently, exec
"/some/script" (indirectly) invokes "monit unmonitor some-file"
(through heartbeat). However, when monitoring is re-enabled on
some-file in the future, monit will treat an immediate  occurrence of
a changed timestamp as being within the window of "5 times within 10
cycles" which causes it to immediately invoke "/some/script" again. In
my case, "/some/script" is a heartbeat failover command, so the
unfortunate effect is that the two nodes just ping-pong the services
back and forth between them every minute.

I have tried restarting the some-file service (as opposed to
unmonitor/monitor), which also does not work.

So far, the only thing that seems to work is to force a "monit reload".

Is there any other way?

To unsubscribe:

To unsubscribe:

To unsubscribe:

reply via email to

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