Action if checksum did not change
Jej <[email protected]> Wed, 8 Jun 2022 21:37:28 +0200
| Newsgroups | gmane.comp.monitoring.monit.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, I try to make a test to check if a checksum changed. I expect it to change in normal conditions. If it does not change (but timestamp may be updated), it's a fail. I am a bit confused with the manual: > Check specific checksum: > > |IF FAILED [MD5|SHA1] CHECKSUM [EXPECT checksum] THEN action| > > Check any file changes: > > |IF CHANGED [MD5|SHA1] CHECKSUM THEN action| I tried this: if changed checksum then exec "/bin/true" else alert But I get an error on the "else". Now I use this: if failed checksum then alert but not sure if it's the right way to do that. The confusing part to me is to have a fail about an optional |[EXPECT checksum]| value. Any idea how I could do that ? Thanks for your help. Btw I take a lot of pleasure to make ton's of working tests! Read you, Jej