Hello,

you can set mail filter to suppress existence alert:

alert f...@bar but not on { nonexist }

See manual for more details: 
http://www.mmonit.com/monit/documentation/monit.html#setting_a_local_alert_statement

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

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

Reply via email to