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