[Top][All Lists]

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

Re: newbie: getting monit to watch for a pattern in logfile

From: Anthony Griffiths
Subject: Re: newbie: getting monit to watch for a pattern in logfile
Date: Tue, 8 Apr 2014 13:10:04 +0100

I did find a solution that watches a log file (/var/log/messages) for the _expression_ 'zmc_m2' and when it finds it it triggers a script called
the command that worked for me (in the monit control file) was:
check file messages with path /var/log/messages
     if match "zmc_m2" then exec "/root/"
it took a bit of debugging to get it to work but I'm impressed with monit now that it does work.

On Tue, Apr 8, 2014 at 11:39 AM, Hearns, John <address@hidden> wrote:


as a newbie to monit I'm having difficulty understanding how I get monit to watch for a particular text string (pattern?) in a logfile and then run a script when it finds it.



I would be interested to hear what the solution you find for this one is.


Specifically, I would like to monitor for the OOM killer coming into action on a system.


My first thought would be to use a log watcher program rather than monit, the classical Logwatch being the obvious one.


The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited | McLaren Technology Centre | Chertsey Road | Woking | Surrey | GU21 4YH | UK | Company Number: 01517478

To unsubscribe:

reply via email to

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