[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exec-action
From: |
Martin Pala |
Subject: |
Re: exec-action |
Date: |
Mon, 23 Jan 2006 21:35:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Debian/1.7.12-1 |
Jan-Henrik Haukeland wrote:
On 22. jan. 2006, at 14.20, Christian Kowarzik wrote:
i do icmp checks with monit.
during failure of the destination host monit will alert me once but
execute the exec-action every cycle.
how can i configure monit, so that it will execute the exec-action
only once the destination host goes down like it does with the
alert-mail?
You can't, monit will always execute the associated action when an if-
test fails. It makes sense for a process, but in this case I can see
your point. On the other hand, if the exec-script you call out to could
fix the problem, you would probably like monit to call it more than
once. Let's hear what Martin thinks first.
Maybe we can add generic 'retry' argument to the action to set the count
of actions performed when the service remains in the same state.
Something like:
if failed then <action1> [retry <x> [times]]
[else if passed then <action2> [retry <y> [times]]]
Current default monit behavior is:
- when failed, perform the action each cycle (alert action is special
- it is tried only once unless overriden by the 'reminder' option)
- when passed, the action is tried only once
=> proposal:
- add the 'retry' option to the <action> (value of -1 means no limits)
- try the action only once by default (even in the case of failed state)
What do you think?
Martin