[Top][All Lists]

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

Re: new http response codes

From: Jan-Henrik Haukeland
Subject: Re: new http response codes
Date: Tue, 3 Jun 2014 00:17:29 +0200

On 02 Jun 2014, at 19:53, K. Adam Wolfe <address@hidden> wrote:

> Hi Listers,
> I'm trying to use monit's new(er) http response code checks and I'm running 
> into an issue.  My check looks like so:
> check host some-server address fqdnoftheserver
>   if failed
>   port  <whatever> protocol http
>   and status = 500
> then alert
> In the logs I see monit is alerting because it's receiving a 200 response 
> (which is not the time to alert).  I was hoping to get alerts only when the 
> response is a 500.  Can that be done?
> Or do I need to change it to something like < 200 or maybe != 200?

You're almost there. The trick is that 'if failed' negate the test. So in your 
test you have 'if the server failed to reply with status code 500 then alert'. 
In your case use != 500 or more general < 500?

reply via email to

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