monit语法错误:“如果5在5个周期内重新启动,则发出警报”

我试图从monit收到警报,如果它无法重新启动服务5次,但出现语法错误

/etc/monit/monit.d/engine.conf:5: Error: syntax error 'alert'

知道有什么问题吗?

/ etc / monit / monitrc:

set daemon  120
set mailserver localhost

set eventqueue
    basedir /var/monit  # set the base directory where events will be stored
    slots 100           # optionaly limit the queue size


set httpd port 2812
  allow localhost

set logfile syslog

set alert root@localhost

include /etc/monit/monit.d/*

/etc/monit/monit.d/engine.conf(monit.d中唯一的文件):

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

版:

# monit -V
This is monit version 4.10.1