Martin Pala <address@hidden> writes:
we can write:
check file myfile with path /foo/bar
if timestamp > 1 day then alert
if checksum and expect the sum 123456
if size > 100 MB then alert
Hehe, excellent, that was going to be my next suggestion.
check stored with pidfile /msg-foo/config/pidfile.store
start program "/usr/iplanet/msg-ims-1/start-msg store"
stop program "/usr/iplanet/msg-ims-1/stop-msg store"
depend stored_ckp
depend stored_lcu
depend stored_per
depend stored_bin
check file stored_ckp with path /msg-foo/config/stored.ckp
if failed timestamp > 1 minute then alert
check file stored_lcu with path /msg-foo/config/stored.lcu
if failed timestamp > 5 minutes then alert
check file stored_per with path /msg-foo/config/stored.per
if failed timestamp > 1 hour then alert
check file stored_bin with path /msg-foo/bin/stored
if failed checksum and expect the sum 123456 then stop
if failed permission 755 then stop
if failed uid iplanet then stop
if failed gid iplanet then stop
if failed size != 655476 then stop
Well, I simply think this is beautiful :-) Very inventive!
Timestamp, checksum and probably other file/device/directory
directives need not to be supported under process.
Agree. This is true OO thinking, specialization are done in
sub-classes. In this case if a process needs to check files it should
do so in a specialized "check file" entry (the sub-class) and to
continue the OO metaphor, sub-classing is done via depends.
In such case it will involve incompatible change, but because we
already did some such changes, it could be better to make all
changes and language cleanup now, then make another incompatible
changes in the future.
Agree, it should not be a problem, since we are stepping up to monit
4.0. Incompatible changes is allowed in a new major release, and it's
better to do them now, since we already have done incompability
changes in the grammar already.