[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 17:52:17 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 22.07.11,14:32, Jostein Berntsen wrote:
> 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.
>
And then suddenly it started working without me doing anything. A convenient way
to solve the problem, but it would be nice to know what happened earlier this
week when this did not work.
Jostein