monit-general
[Top][All Lists]
Advanced

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

Re: Different actions/thresholds in one service test?


From: Martin Pala
Subject: Re: Different actions/thresholds in one service test?
Date: Thu, 29 Nov 2012 16:56:58 +0100

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 <address@hidden> 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


reply via email to

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