On 21. sep. 2007, at 04.23, Alex Stewart wrote:
I am having a problem with monit that occurs in both v4.8.1 and v4.9
and the changelog (http://www.tildeslash.com/monit/CHANGES.txt)
appears to specifically state that the bug was fixed in v4.8:
("Removed a feature introduced in 4.7 which tested that a check-file,
check-directory or check-fifo actually refered to an existing object
of that type. Monit should not require these file objects to exist at
startup.")
This refer to paths in a check entry, e.g. you can write
check file testMat_pidfile with path /var/run/testMat.pid
without monit complaining at startup if /var/run/testMat.pid does not
exist. With regards to the timestamp test monit expect this file to
exist so it can take an initial timestamp at startup and compare the
file stamp in subsequent runs. However I can see your point when
monitoring in non-active mode. I have changed the monit code in CVS to
allow the "if changed timestamp" test to refer to a non-existing file
so we are consistent. Note that this mean the initial timestamp will
be 0 and as long as the file does not exist monit will issue an alert
(in active mode). As soon as the file exist, the test "if changed
timestamp" will be true and execute its action. The timestamp is saved
and the next time the test run it will work as expected.