|
From: | Mehul Ved |
Subject: | Re: Syntax for else if |
Date: | Thu, 16 Jun 2016 14:59:29 +0000 |
Here's what I have configured: if 2 restarts within 10 cycles then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
else if succeeded then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
but when I do monit validate it throws following error:
/etc/monit/conf.d/frontendLogger.conf:19: syntax error 'else'
Here's the whole file, in case it helps
----- START -----
check process frontendLogger matching frontendLogger
start program = "/bin/systemctl start frontendLogger"
stop program = "/bin/systemctl stop frontendLogger"
restart program = "/bin/systemctl restart frontendLogger"
group nodejs
if failed host 127.0.0.1 port 10500 protocol http
request /ping
content = "PONG"
with timeout 2 seconds
for 2 times in 4 cycles
then restart
if failed host vr.com port 443 type TCPSSL protocol http
request /logger/ping
content = "PONG"
with timeout 2 seconds
for 2 times within 4 cycles
then restart
if 2 restarts within 10 cycles then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
else if succeeded then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
if does not exist for 3 times in 10 cycles then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
else if succeeded then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
if changed pid for 3 times in 10 cycles then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
else if succeeded then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
if memory > 70 MB for 3 cycles then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
else succeeded then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
if cpu > 1% for 3 cycles then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
else if succeeded then exec "/usr/local/bin/pagerduty-trigger frontendlogger"
----- END -----
From: monit-general <monit-general-bounces+address@hidden> on behalf of Rui Lapa <address@hidden>
Sent: Thursday, June 16, 2016 4:49 PM To: This is the general mailing list for monit Subject: Re: Syntax for else if ELSE IF SUCCEEDED THEN
On Thu, Jun 16, 2016 at 11:17 AM, Mehul Ved
<address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |