if failed url http://local/test.php
     and content != '^OK$'
     then alert

never triggers an alert. I tried with content "OK", "ERR is not OK"
and just "ERR" - monit always displays "online with all services".
Anyway I believe it works the other way around:

and countent == "something"

if this test fails an alert is triggered

Regarding "Monit uses POSIX Extended Regular Expressions" - yes, that
is what I understand, but it doesn't actually seem to work. An example
would be (quote from wikipedia):

[^ ] Matches a single character that is not contained within the
brackets. For example, [^abc] matches any character other than "a",
"b", or "c". [^a-z] matches any single character that is not a
lowercase letter from "a" to "z". As above, literal characters and
ranges can be mixed.

So I tried [^OK] - this should match any single character that is not
O or K, but an alert is never triggered, regardless if the content
tested is "OK" or "ERR"

--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to