It depends on what type of unmonitor you mean:

1.) the service can be unmonitored manually (by administrator) via monit CLI or 
GUI … this type of unmonitor sends an “action” event type (the same event type 
is shared however by any other manual action: 
start/stop/restart/monitor/unmonitor)

        set alert foo@bar only on {action}

2.) or the service can be unmonitored via a restart timeout statement … this 
sends a “timeout” event type, which can be easily filtered:

        set alert foo@bar only on {timeout}

        check process …
                if 2 restarts within 3 cycles then unmonitor


you can combine the filter for both event types:

        set alert foo@bar only on {action, timeout}


Regards,
Martin



Currently not - the “unmonitor” event type is “action” 

> On 14 Oct 2015, at 00:31, Florin Andrei <[email protected]> wrote:
> 
> Is there a way to send an alert *only* when a service is degraded into the 
> unmonitored state? I want the email sent only for that transition, any other 
> state changes don't matter for this particular service I'm monitoring.
> 
> -- 
> Florin Andrei
> http://florin.myip.org/
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


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

Reply via email to