2013-08-31 78 views
0

我正在使用監視來監視幾個自定義rails守護進程。它們在樹莓派上慢慢啓動(在那裏並不令人意外)。但是,即使日誌顯示守護進程正在運行,警報電子郵件也一樣,但是監控摘要命令無休止地在waitingexecution failed之間變化。守護進程不會持續重新啓動。監視狀態並不反映它自己的現實

我monit的配置文件看起來像

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 

的monit的守護週期時間爲60秒。日誌文件顯示

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

而且monit的電子郵件說

Exists Service setpoint_manager 

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

我已驗證了PID文件和ps ax匹配。如果我通過monit重啓守護進程,狀態就會變得正確。

爲什麼monit狀態自我糾正?

回答

1

我聯繫了M/Monit的優秀支持人員,他解釋說這是5.4版本中已知的一個已知問題,在5.5版本中已修復。由於2013-07-26-wheezy-raspbian發行版apt-get僅提供5.4,因此我下載並構建了monit 5.6,並且一切都很好。問題解決了。

爲了建立在樹莓裨不加載更多的東西,並同時保持相同的構造,我用下面的配置行:

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