我运行Ubuntu 13.04与相应版本的监测(5.5-6)和星号(1.8.13.1)。 我有监视我的星号日志文件断开连接到我的SIP提供商,并重新启动星号为新的连接。 这里是monit监视脚本的相关部分:
check file messages with path "/var/log/asterisk/messages" start program = "/etc/init.d/asterisk start" stop program = "/etc/init.d/asterisk stop" if match "Retransmission timeout reached" then restart and noalert [email protected] if match "timed out, trying again \(Attempt " then restart and noalert [email protected]
错误的检测工作正常,当条件满足时我收到邮件。 Monit也会停止星号守护程序,并且/ var / run中相应的PID文件被正确删除。 但星号不会重新开始。 monit或asteriks日志文件中没有相应的错误。
这种情况下的错误是什么? 我在哪里可以find更多的debugging信息?
有时候需要在非守护进程模式下以最高的冗长度运行monit,同时引发错误(例如将string回显到日志文件中),以确定问题所在。
停止监视,并启动它:
monit -c /path/to/monit.conf -vv -I 2>&1 | tee /tmp/monit_debug.log
提出错误并回报您所看到的内容。