monit-general
[Top][All Lists]
Advanced

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

Different actions/thresholds in one service test?


From: Michael Parker
Subject: Different actions/thresholds in one service test?
Date: Wed, 28 Nov 2012 16:03:12 -0800

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

reply via email to

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