monit syntax error : "if 5 restarts within 5 cycles then alert"
- by omry
I am trying to get an alert from monit if it fails to restart a service 5 times, but I get a syntax error
/etc/monit/monit.d/engine.conf:5: Error: syntax error 'alert'
this is the engine.conf file:
check process engine with pidfile /var/run/engine.pid
group engine
start program = "/etc/init.d/engine start"
stop program = "/etc/init.d/engine stop"
if 5 restarts within 5 cycles then alert
any idea what's wrong with it?