monit-general
[Top][All Lists]
Advanced

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

Re: disable alert reminders for some checks


From: Lutz Mader
Subject: Re: disable alert reminders for some checks
Date: Thu, 21 Jul 2022 23:06:32 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hello Aleks,
you can use local alert definitions too.

A snipped from
https://mmonit.com/monit/documentation/monit.html#Setting-an-alert-recipient

> It is also possible to use the local alert statement in the context
> of a service check to enable alert for the given service only:
>
> ALERT mail-address [[NOT] {event, ...}] [REMINDER cycles]
>
> Local alert example:
>
>  check host myhost with address 1.2.3.4
>      if failed port 3306 protocol mysql then alert
>      if failed port 80 protocol http then alert
>      alert foo@baz # Local service alert
>
> You can combine global and local alert statements. If there is
> a conflict, the local alert has precedence and overrides the
> global statement.

The local alert definition allow similar definition.

Lutz

> Hi Lutz,
> 
> Thanks for the quick response. As I mentioned I need this only for some
> checks, so "only on" wouldn't work for my case, as it affects all
> checks.  Unless I misunderstood your answer.
> 
>> You can override the "remainder" in the "then alert" statement also.
> 
> could you please show an example how to overwrite, because I cannot find
> anything in the manual.
> 
> -Aleks
> 
> On 7/21/22 1:30 PM, Lutz Mader wrote:
>> Hello Aleks,
>> as long as you would like to use the exceptional cases all the time, you
>> can use "only on" with the alert. The event "nonexist" is used for
>> service down/up.
>>
>> For some more information see
>> https://mmonit.com/monit/documentation/monit.html#Setting-an-alert-recipient
>>
>>
>> A suggestion only,
>> Lutz
>>
>> p.s.
>> You can override the "remainder" in the "then alert" statement also.
>>
>>> Hi,
>>>
>>> I have global alert reminder set to repeat every two hours for all
>>> checks.
>>>
>>> SET ALERT email@domain.com  WITH REMINDER ON 120 CYCLES
>>>
>>> Is there a way to disable reminders for some checks? I.e check would
>>> send alert on status change (i.e service down/service up) without
>>> reminders?
>>>
>>>
>>> Thanks!
>>>
>>>
>>>
>>
> 




reply via email to

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