monit: /etc/monit.conf:188: Error: syntax error ‘start program = “‘

# monit -V
This is monit version 5.1.1
Copyright (C) 2000-2010 by Tildeslash Ltd. All Rights Reserved.

# cat /etc/redhat-release 
CentOS release 6.6 (Final)

The monit settings inside /etc/monit.conf:

check system localhost
    start program = "service zimbra start"
    stop  program = "service zimbra stop"

What causes the syntax error?

Answer

You need to have a stanza dedicated to Zimbra. Your syntax is all wrong.

Read the configurations examples section of the Monit documentation.

You’ll want something like:

check process zimbra
    with pidfile "/var/run/zimbra.pid"
    start program = "/sbin/service zimbra start"
    stop  program = "/sbin/service zimbra stop"

Attribution
Source : Link , Question Author : grepmaster , Answer Author : Eddie C.

Leave a Comment