On 02 Jun 2014, at 19:53, K. Adam Wolfe <[email protected]> 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?
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to