我注意到偶尔amavis没有运行。
我以为monit正在观察这个过程,但它似乎并没有警告我或修复它。
我的monitrc条目看起来像这样,我可以确认启动/停止monit作品的过程:
check process amavisd with pidfile /var/run/amavis/amavisd.pid group mail start program = "/etc/init.d/amavis start" stop program = "/etc/init.d/amavis stop" if failed port 10024 protocol smtp then restart if 5 restarts within 5 cycles then timeout depends on amavisd_bin depends on amavisd_rc check file amavisd_bin with path /usr/sbin/amavisd-new group mail if failed checksum then unmonitor if failed permission 755 then unmonitor if failed uid root then unmonitor if failed gid root then unmonitor check file amavisd_rc with path /etc/init.d/amavis group mail if failed checksum then unmonitor if failed permission 755 then unmonitor if failed uid root then unmonitor if failed gid root then unmonitor
我应该如何解决这个问题?
我认为正确的pidfilepath是/var/run/amavisd/amavisd.pid
所以你在' amavisd
'目录下缺less' d
'。
启动和停止将起作用,因为启动/停止path可以,但是pid文件不会被find。
首先检查监控configuration中的所有testing是否有效。
/var/run/amavis/amavisd.pid
是否存在? /etc/init.d/amavis
启动和停止function是否工作? /usr/sbin/amavisd-new
和/etc/init.d/amavis
存在? 然后你应该继续检查monit summary
和monit status verbose
的输出,并检查输出是否会帮你find问题。
这可能是monit或amavis问题的一个问题。 或两者的组合。 如果您发布更多信息(例如,来自monit summary
输出),我将在更多的帮助下编辑这个答案。