monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Action if checksum did not change


From: Jej
Subject: Action if checksum did not change
Date: Wed, 8 Jun 2022 21:37:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0


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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]