Hi,

current Monit version doesn't support if-elseif-else tests ... we plan to add 
it in the future.

Regards,
Martin


On Nov 29, 2012, at 1:03 AM, Michael Parker <[email protected]> wrote:

> Hi all,
> 
> I was wondering if there were ways to "collapse" the two "failed port" 
> service tests below:
> 
> * * * * *
> check process apache with pidfile /var/run/httpd/httpd.pid
>       start program = ...
>       stop program = ...
>       ...
>       if failed port 443 type tcpssl protocol http
>               request "/some/path" hostheader "some.domain.com"
>               with timeout 10 seconds
>       then alert
>       if failed port 443 type tcpssl protocol http
>               request "/some/path" hostheader "some.domain.com"
>               with timeout 10 seconds
>               3 times within 4 cycles
>       then restart
> * * * * *
> 
> Meaning I can apply different actions with different thresholds in one 
> service test. Something that might look like:
> 
> * * * * *
>       if failed port 443 type tcpssl protocol http
>               request "/some/path" hostheader "some.domain.com"
>               with timeout 10 seconds
>               if 1 time within 1 cycle
>                       then alert
> 
> 
>               elif 3 times within 4 cycles
>                       then restart
> 
> 
> * * * * *
> 
> I'm not looking to this for efficiency (i.e. sending one request versus two 
> per cycle), but to make the escalation in my control file more readable.
> 
> Thanks,
> Mike
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general

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

Reply via email to