monit-general
[Top][All Lists]
Advanced

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

Re: notification of (action) restarts aren't sent


From: Jo Rhett
Subject: Re: notification of (action) restarts aren't sent
Date: Thu, 11 Jun 2015 02:02:55 -0700

On Jun 11, 2015, at 1:13 AM, Martin Pala <address@hidden> wrote:
> You just mixed the “<action>” placeholder 
> (https://mmonit.com/monit/documentation/#ACTION) with verbatim “action” event 
> type (https://mmonit.com/monit/documentation/#Setting-an-event-filter) - 
> these two are not related and the manual doesn’t say that if the rule matches 
> “action” evet type is triggered. 

Um, it most certainly does say that. All of the quoted text lies in the 
section, and in fact on the same page of a screen display as the major heading 

https://mmonit.com/monit/documentation/#SERVICE-TESTS

This very clearly says: 
> Monit provides several tests you can use in a 'check' statement to test a 
> service. You can test either for some expected value or range and take 
> actions if the value changed.”


So this is the context of the other quotes. This section has nothing to do with 
manual actions.

It goes on to say 
> ACTION
> In each test you must select the action to be executed from this list:

It goes on to provide a list of actions. The description for the restart action 
says 
> restarts the service and send an alert

There is no mixing of context here. The context in english is very clear and 
very direct. The english could not be plainer. I hear your answer that the code 
doesn’t match the language, but the language very clearly and expressly says 
that we can choose an action, and that the restart action will both restart the 
service and send an alert.

There is no other way to read that text. These statements are very tightly tied 
and directly related, unlike what you have claimed above.



>> On 11 Jun 2015, at 09:54, Jo Rhett <address@hidden> wrote:
>> 
>> On Jun 10, 2015, at 11:57 PM, Martin Pala <address@hidden> wrote:
>>> The “action” event is triggered for CLI/GUI manual actions only (such as 
>>> “monit start apache”). If monit detects some error it sends failure 
>>> notification and the recovery notification when the problem is fixed => two 
>>> emails are normal.
>> 
>> I believe the manual page is confusing in this matter. The manual in 5.2.5 
>> all the way up through 5.14 says the following:
>> 
>>> ACTION
>>> In each test you must select the action to be executed from this list:
>>>  (…)
>>>     • RESTART restarts the service and send an alert. 
>> 
>> You can see it here https://mmonit.com/monit/documentation/#ACTION
>> 
>> Would you consider adding an alert type which is a singular alert that a 
>> service was restarted?
>> 
>> 
>> 
>>>>> On Jun 10, 2015, at 11:21 AM, Jo Rhett <address@hidden> wrote:
>>>>>> So I’ve installed monit 5.2.5 from EPEL. I realize this is old, but want 
>>>>>> to ensure that this isn’t a configuration issue. Can someone point out 
>>>>>> to me if I did something wrong here?
>>>>>> 
>>>>>> I’ve configured it send all alerts to my address, which works. If I 
>>>>>> leave instance alerts on, I get notified every time monit stops and 
>>>>>> starts.  
>>>>>> 
>>>>>> The restart works properly — the service is restarted, but no e-mail is 
>>>>>> sent. If I enable “nonexist” alerts, I get an alert that the process 
>>>>>> doesn’t exist, and then an alert that it has been started. That’s two 
>>>>>> alerts, and I’d like just one. I want the “action” alert, but one is not 
>>>>>> being sent. If I disable both instance and nonexist, no e-mail is sent 
>>>>>> when the service is restarted.
>>>>>> 
>>>>>> The documentation says: 
>>>>>>> In each test you must select the action to be executed from this list:
>>>>>>>  ·   RESTART restarts the service and sends an alert.
>>>>>> 
>>>>>> That underline is in the man page for emphasis. However I’m not 
>>>>>> receiving the alert that it was restarted.
>>>>>> 
>>>>>> Config:
>>>>>> 
>>>>>> set alert address@hidden
>>>>>> only on { action, connection, content, data, exec, fsflags, gid, icmp, 
>>>>>> invalid, permission, resource, size, timeout, timestamp, uid }
>>>>>> 
>>>>>> check process apache
>>>>>> with pidfile /var/run/httpd/httpd.pid
>>>>>> group apache
>>>>>> start "/etc/init.d/httpd start"
>>>>>> stop "/etc/init.d/httpd stop"
>>>>>> if failed host localhost port 80 protocol http request "/robots.txt" for 
>>>>>> 2 cycles
>>>>>> then restart
>>>>>> if failed host localhost port 80 protocol apache-status waitlimit < 20% 
>>>>>> for 2 cycles
>>>>>> then alert
>>>>>> if 3 restarts within 5 cycles
>>>>>> then alert
>>>>>> 
>>>>>> -- 
>>>>>> Jo Rhett
>>>>>> +1 (415) 999-1798
>>>>>> Skype: jorhett
>>>>>> Net Consonance : net philanthropy to improve open source and internet 
>>>>>> projects.
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> To unsubscribe:
>>>>>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>>>> 
>>>>> -- 
>>>>> Jo Rhett
>>>>> +1 (415) 999-1798
>>>>> Skype: jorhett
>>>>> Net Consonance : net philanthropy to improve open source and internet 
>>>>> projects.
>>>>> 
>>>> 
>>>> -- 
>>>> Jo Rhett
>>>> +1 (415) 999-1798
>>>> Skype: jorhett
>>>> Net Consonance : net philanthropy to improve open source and internet 
>>>> projects.
>>>> 
>>>> 
>>>> --
>>>> To unsubscribe:
>>>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>> 
>>> 
>>> --
>>> To unsubscribe:
>>> https://lists.nongnu.org/mailman/listinfo/monit-general
>> 
>> -- 
>> Jo Rhett
>> +1 (415) 999-1798
>> Skype: jorhett
>> Net Consonance : net philanthropy to improve open source and internet 
>> projects.
>> 
>> 
>> --
>> To unsubscribe:
>> https://lists.nongnu.org/mailman/listinfo/monit-general
> 
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general

-- 
Jo Rhett
+1 (415) 999-1798
Skype: jorhett
Net Consonance : net philanthropy to improve open source and internet projects.




reply via email to

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