[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: behavior when content match status changes?
From: |
Jostein Berntsen |
Subject: |
Re: behavior when content match status changes? |
Date: |
Fri, 22 Jul 2011 18:01:46 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 20.07.11,16:20, Yvonne Lam wrote:
> I am running into an issue where monit alerts correctly on a content match,
> but I don't receive an alert when the status of the content match changes.
> I had the impression from the documentation that it was supposed to, but
> perhaps I am misinterpreting something.
>
> My setup is
>
> monit 5.2.5
>
> snippet of monit config:
> check file logfile with path /path/to/logfile
> if match
> "FAIL"
> then alert
>
> logfile:
> |Wed Jul 20 21:49:47 UTC 2011|PASS|204|Service1|
> |Wed Jul 20 21:49:47 UTC 2011|FAIL|204|Service2 |
> |Wed Jul 20 21:49:47 UTC 2011|PASS|200|Service3|
> |Wed Jul 20 21:49:47 UTC 2011|PASS|200|Service4|
> |Wed Jul 20 21:49:47 UTC 2011|PASS|200|Service5|
> ...
> (new text is appended to the logfile via echo: echo "string" >> logfile)
>
> I receive an alert when the string "FAIL" shows up, and I was expecting that
> when the status changed back to "PASS" that I would be alerted again, but
> that is not the case. Is there a way to fix my config so that I get alerts
> when the status of the content match changes?
>
I believe you then need to use the reminder option:
http://www.mmonit.com/monit/documentation/monit.html#setting_an_error_reminder
Jostein