我試圖監視服務。我的monit定義如下。Monit IF/ELSE語法
當我調用monit -r
我收到/etc/monit/conf.d/authentication.monit:10: syntax error 'else'
check host self with address myhost
start program = "/usr/bin/service start authentication"
stop program = "/usr/bin/service stop authentication"
if failed port 443 protocol https
request/
with timeout 5 seconds
for 2 cycles
then restart
if 1 restarts within 4 cycles then exec "/etc/monit/pagerduty-trigger authentication" else if passed for 2 cycles then exec "/etc/monit/pagerduty-resolve authentication"
所有的文件似乎表明我的語法是正確的。
我試圖遵循兩個文檔