monit-general
[Top][All Lists]
Advanced

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

Re: [monit] Monitor timestamp only and not existence of file


From: Martin Pala
Subject: Re: [monit] Monitor timestamp only and not existence of file
Date: Thu, 21 Jan 2010 18:47:44 +0100

Hello,

you can set mail filter to suppress existence alert:

alert address@hidden but not on { nonexist }

See manual for more details: 

Note: the "not" option requires monit-5.x

Regards,
Martin


On Jan 21, 2010, at 4:56 PM, Rishad Omar wrote:

Hello,


I'd like to monitor the timestamp of a file and execute my command when
the file is 'old'. But I don't want to be alerted if the file exists nor
if the the file doesn't exist.
That is, I want to be alerted ONLY if the file exists and is older than
10 mins.

The following works fine with the timestamp but in addition I get
alerted when the file exists and then later that it doesn't exist.

       check file lock path /some/path/lock
               if timestamp > 10 minutes
                   then exec "/some/command"

I tried the following, but it hasn't helped:

       check file lock path /some/path/lock
               start program = "/bin/touch /tmp/1.1"
               if timestamp > 10 minutes
                   then exec "/some/command"

Thanks, Rishad








--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

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