[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 28 Dec 2004 20:25:56 +0100
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5
Full syntax of testing rule is:
IF FAILED <test> THEN <action> [ELSE IF RECOVERED THEN <action>]
The second part is optional and if omited, monit will just send alert in
the case of state change (i.e. "failed -> success"). It could be
possible to use that for what you asked for, for example:
if failed host www2.foo.bar port 80 protocol http then alert
else if recovered then exec "/my/script"
Kaspar Landsberg wrote:
is there any way to use "negated" service checks? I'd like monit to
perform some action if a given service is *succeeding* instead of
if succeeded port 80 ...
if not failed port 80 ...
That way one could ensure that a possible backup service on a remote
machine is not running concurrently with the primary service on the local
Like "if service X is running on the local *and* remote machine at the
same time, do <something>" (e.g. stop the remote service).
At least a simple negation like "if succeeded" or "if not failed" should
be rather easy to implement I suppose.
|[Prev in Thread]
||[Next in Thread]|
- Re: Negation,
Martin Pala <=