[Top][All Lists]

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

Re: Another feature

From: Martin Pala
Subject: Re: Another feature
Date: Sun, 12 Sep 2010 20:47:51 +0200

On Sep 12, 2010, at 7:59 PM, Andrew Holt wrote:
>> Yes, the alert action implementation handles the notification so, that the 
>> alert is sent only on state changes (success->failure or failure->success). 
>> There is a 'reminder' option which allows to repeat the alert if the service 
>> remains in error, but by default it sends one alert only.
>> If you delegate the alert to script via exec action, it will be executed on 
>> every failure cycle (monit tries to recover the service and unless timeout 
>> statement is used, it calls the exec action each time). In order to reach 
>> the same alert-on-state-change functionality, you'll need to do it in the 
>> executed script.
> So my script will have to capture the state, save it and on the next run 
> compare ?
> Would it be simpler to have alert_exec or execon that execs the script only 
> on a state change ?

I think the alert_exec will be confusing - if the goal is to send alert via 
channel wich could be useful in general (such as snmp trap), then it will be 
better to implement native support for it.

Alternatively we can add option which will allow to set sort of per-action 
timeout - if the error state persists, the action will be performed only <x> 
number of cycles - by default the action is triggered on every failure.

reply via email to

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