[Top][All Lists]

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

Re: [monit] Having two "if changed" statements

From: Martin Pala
Subject: Re: [monit] Having two "if changed" statements
Date: Fri, 07 Dec 2007 22:21:49 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20071119 Iceape/1.1.7 (Debian-1.1.7-1)

When monit tests the timestamp changes, then just one rule is evaluated. When monit parses the configuration, the timestamp rules are added to the head of the timestamp rules list. Thus your second timestamp rule is evaluated before the first one.

Both these features can be changed, so monit can evaluated all change timestamp rules and keep the rule order (needs source code modification - if you want to, you can look on it, patch is welcomed).


MosheC wrote:
I got no response to this one for a couple of weeks.
If this could be commented on I would appreciate it

MosheC wrote:
Below is a monitrc excerpt.
The intention was that if xxx.log changed once in a while I should just
an alert, but if it changes too often (3 in 5) the check should be
unmonitored in order to stop
endless alerts, under the assumption that such frequent changes point to a
recurring problem, which is tru in my case.

It does not work.
Effectively, only the 2nd line takes effect and I only get the message
unmonitoring. If I have changes once in a while, I get no alerts at all.
Without the 2nd line, I do get an alert on each change.
How do I make both lines work?

check file xxx.log with path /home/mm/logs/xxx.log
        if changed timestamp then alert
        if changed timestamp for 3 times within 5 cycles then unmonitor


To unsubscribe:

reply via email to

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