RussK
RussK

Reputation: 199

monit status does not reflect its own reality

I am using monit to monitor a couple of custom rails daemons. They boot slowly on a raspberry pi (no surprise there). But the monit summary command endlessly alternates between waiting and execution failed even though the log says the daemons are running, as does the alert email. The daemons are not continuously restarting.

My monit config file looks like

check process setpoint_manager with pidfile /opt/thermyos.com/server/current/tmp/pids/setpoint_manager.pid every 2 cycles
  start program = "/etc/init.d/setpoint_manager start" as uid thermyos and gid thermyos
  stop program  = "/etc/init.d/setpoint_manager stop"
  if 5 restarts within 5 cycles then timeout

The monit daemon cycle time is 60 seconds. The log file shows

[EDT Aug 30 17:38:35] info     : 'setpoint_manager' process is running with pid 2984

And the monit email says

Exists Service setpoint_manager 

Date:        Fri, 30 Aug 2013 17:38:35
Action:      alert
Host:        thermdev
Description: process is running with pid 2984

I have verified that the pid files and ps ax match. If I restart the daemons via monit, the status becomes correct.

Why doesn't monit status ever self-correct?

Upvotes: 0

Views: 1398

Answers (1)

RussK
RussK

Reputation: 199

I contacted the excellent support folks at M/Monit who explained that this was a known bug in monit 5.4 that was fixed in 5.5. Since the 2013-07-26-wheezy-raspbian release apt-get only provides 5.4, I downloaded and built monit 5.6 and everything works great. Problem solved.

In order to build on the Raspberry Pi without loading more stuff and while keeping the same configuration, I used the following config line:

./configure --without-pam --sysconfdir=/etc/monit

Upvotes: 1

Related Questions