monit-general
[Top][All Lists]
Advanced

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

Re: [monit] monit-or-ing a status code returned by URI


From: Jan-Henrik Haukeland
Subject: Re: [monit] monit-or-ing a status code returned by URI
Date: Sat, 19 Jan 2008 19:13:16 +0100

Just to make it clear, parenthesis in monit is just white space and has no meaning, but can be used as syntactical sugar. It is not possible to use parenthesis to change the evaluation of an _expression_. The "if failed" statement is written in stone as "if failed <boolean _expression_> then <action>". Which means in the content check case below that we have to use double negation which may be counterintuitive at first sight.

On 19. jan.. 2008, at 16.50, Elijah Wright wrote:


yes, those parentheses are very helpful!  thanks a lot :-)

On 1/19/08, Jan-Henrik Haukeland <address@hidden > wrote:

On 19. jan.. 2008, at 13.46 , Jan-Henrik Haukeland wrote:

if failed url http:////localhost:9001/status  and content != "ERROR" then restart

Ps. It may be easier to see the boolean _expression_ if you use parenthesis, which is legal in monit

if failed (url http:////localhost:9001/status and content != "ERROR") then restart

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

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


reply via email to

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