monit-general
[Top][All Lists]
Advanced

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

Re: Action on file content tests


From: Martin Pala
Subject: Re: Action on file content tests
Date: Fri, 24 Feb 2006 17:42:57 +0100
User-agent: Thunderbird 1.5 (Windows/20051201)

Hi,

the full syntax is:

  IF [NOT] MATCH {regex|path} [[<X>] <Y> CYCLES] THEN action

The [[<X>] <Y> CYCLES] part allows to specify the occurence rate needed to process the action (i.e. for example if the test matches 7 times in 10 consecutive cycles then perform the restart).

Martin



Florian Munz wrote:
Hello,

I am watching my httpd_error log file for a particular string with the
'if match regex' statement. The problem is that this string doesn't
appear only once if it appears. So I get usually 10 alerts in the first
cycle and more than 100 alerts in the cycles after that.

What I want to do is restart the apache server if that strings appears
but after some tests with the EXEC action and RESTART action (letting
the apache monitor depend on the file content test) it seems for every
alert it trys to restart the server which is definitely not good.

What can I do that the file content test behaves more like a connection
test? So that it alerts once on failure (the specific regex is matched)
and then again if the string stops appearing in the logfile?


thanks,
Florian


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






reply via email to

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