0
我正在使用監視來監視幾個自定義rails守護進程。它們在樹莓派上慢慢啓動(在那裏並不令人意外)。但是,即使日誌顯示守護進程正在運行,警報電子郵件也一樣,但是監控摘要命令無休止地在waiting
和execution 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狀態自我糾正?