[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: File contains with specific word
From: |
Jostein Berntsen |
Subject: |
Re: File contains with specific word |
Date: |
Fri, 22 Jul 2011 14:32:21 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 29.06.11,07:15, AJames wrote:
>
> Hi,
>
> I am trying the execute the following example to check whenever the log
> file will update with any error message i have to alert. I added the
> following line in my monitrc file.
>
> check file test.txt with path /home/sample/test.txt
> if match
> "error" then alert
>
> Let me know if am wrong any where.
I was just about to post a mail regarding the same issue when I saw this. I have
the exactly same problem:
# File check test
#
check file word with path /home/jostein/word.txt
if match "Peter.*" then
alert
This is the message on the monit web report:
Match regex no
Associated regex If If match "Peter.*" 1 times within 1 cycle(s) then
alert
Is there any way to resolve this? Other alerts for file directory size and RAM
use and more is working as expected.
This is Monit version 5.2.5
Copyright (C) 2000-2011 Tildeslash Ltd. All Rights Reserved.
Jostein
- Re: File contains with specific word,
Jostein Berntsen <=