|
From: | Ben Soot |
Subject: | Conditionally check file content |
Date: | Wed, 17 Jun 2015 09:57:22 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
Hi there, I want to be alerted if file content (in an error log file) matches a pattern. The difficulty is that the file itself might not exist at all, which is ok. How would you do that? My current clause gives me a read flag in mmonit when the file does not exist: check file myapp-err.log with path /var/www/myapp/log/myapp-err.log if match "^.*FATAL.*$" then alert Thanks Ben |
[Prev in Thread] | Current Thread | [Next in Thread] |