monit-general
[Top][All Lists]
Advanced

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

Single content match over multiple lines


From: Marc Rossi
Subject: Single content match over multiple lines
Date: Thu, 14 Jan 2016 10:24:31 -0600

Looking for single content match over multiple lines to indicate success.  For example, the below test should ONLY alert if there was no single line matching the supplied regex generated since the last cycle.  There can be other lines that do not match but there has to have been at least one line that did match.

check file test.log
      with path /var/log/test.log
      if not match "Found \d+ of \d+ widgets" then alert

Is this possible?  Or do I have to write a custom script to do this check and alert on it's return status?

TIA.

reply via email to

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