-2
# 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?

kubanczyk
  • 13,812
  • 5
  • 41
  • 55
grepmaster
  • 143
  • 2
  • 4
  • 14

1 Answers1

2

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"
Eddie C.
  • 535
  • 1
  • 3
  • 12
ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • FYI, I referred to http://www.alexkuo.info/?p=280 and played a bit with identation to see if that was the culprit (which is not) – grepmaster Oct 01 '15 at 08:25
  • @grepmaster The information and syntax on the web page [you linked](http://www.alexkuo.info/?p=280) is also incorrect. The author even states, _"I added the following to the file to monitor the user and system CPU usage. Not sure if this will work yet."_ - It's just **bad** information. Please read the official [Monit configurations examples](https://mmonit.com/monit/documentation/monit.html#CONFIGURATION-EXAMPLES) link that I posted in my answer. – ewwhite Oct 01 '15 at 08:28
  • Thanks. It seems I have to decide for myself which component of zimbra's PID that needs to be monitored. – grepmaster Oct 01 '15 at 08:37