monit-general
[Top][All Lists]
Advanced

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

Re: Alert if file contents are greater than 40


From: Dimitri Yioulos
Subject: Re: Alert if file contents are greater than 40
Date: Thu, 10 Jan 2013 17:26:59 -0500
User-agent: KMail/1.9.9

On Thursday 10 January 2013 4:24:27 pm Jenny Hopkins wrote:
> 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
>


Er, Jenny. not to diss the capabilities of Monit, but why 
don't you simply extend your script to send out an email 
alert based on a memory usage threshhold?

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




reply via email to

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