monit-general
[Top][All Lists]
Advanced

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

Alert if file contents are greater than 40


From: Jenny Hopkins
Subject: Alert if file contents are greater than 40
Date: Thu, 10 Jan 2013 21:24:27 +0000

Hullo,

I've been having an issue with memory hungry programs so have written
a script that takes a user and program params and stuffs the memory
usage into a file as an integer. This is run by cron every ten
minutes.
I want monit to keep an eye on the file contents and alert if it
exceeds a certain figure.
So far, I can only find evidence that monit supports text file
matches. I've tried

"check file memfile.irssi with path /tmp/memfile.irssi
if  match "[4-9][0-9]" then alert"

but this doesn't seem to work. I'm adding a \n to the end of the file.

Sorry if this has been asked before.

Thanks,

Jenny



reply via email to

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