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: Jenny Hopkins
Subject: Re: Alert if file contents are greater than 40
Date: Fri, 11 Jan 2013 10:18:11 +0000

On 11 January 2013 03:54, Callum Macdonald
<address@hidden> wrote:
> Hi Jenny,
>
> Have you considered having monit measure the program's memory usage?
>
> I think this line of the manual may be relevant to your situation:
>
> On startup the read position is set to the end of the file and monit
> continue to scan to the end of file on each cycle. But if the file size
> should decrease or inode change the read position is set to the start of the
> file.
>
> As I understand it, monit will probably read the file once, then wait for
> new lines to be written. In your case, if the filesize remains the same or
> increases, monit will never again read the first (and only) line of the
> file.
>
> I think this feature is aimed at log file monitoring, when data is
> constantly being written to a continuous log file. If you were to write a
> new line to the file every 10 minutes and then truncate it every so often,
> that might work. But honestly, it all sounds far more complicated than
> letting monit measure your memory usage.
>
> Love & joy - Callum.
>

I've got monit watching stock programs such as apache2 and
spamassassin, but this particular problem concerns not a global
program running (debian server) but an individual user's programs, if
that makes sense. Hence my script to pick out that particular user and
write to file.
It was more the syntax I was asking about for my regex.

Thanks for the replies,
Jenny



reply via email to

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