On 03/10/2025 21:30, Lutz Mader wrote:
Hello,
the "if content" test work in the same way in "check file" and "check
program". Unfortunately the test does not handle some of the "normal"
options used by the most tests.

Does that mean the "IF CONTENT" condition doesn't work like others - in
the sense that it doesn't have / remember a failure or success state
from the last run - so then "REPEAT EVERY" doesn't really work with it?

The test is based on the old "if match" test and does not handle "repeat
every" or "else if succeeded" and "for x times within x cycles" does not
work properly always.

In general I use the "if status" test in "check program", but sometimes
"if content" is more useful or easy to use. It also does not require a
script to evaluate the results of a test program.

See and etc.
https://mmonit.com/wiki/Monit/ConfigurationExamples#CPUTemp

Short answer, yes, it does not,
have a nice weekend,
Lutz

Thank you very much for all the info - that is very useful. I have managed to change my scripts so that I can use "IF STATUS" - which gives me more options.

Many thanks

Reply via email to