如何通过Monit监控gearmand守护进程



所以监视gearman服务器的配置文件是:

set logfile /var/log/monit.log
check process gearmand with pidfile /var/run/gearmand.pid
    start program = "sudo gearmand --pid-file=/var/run/gearmand.pid"
    stop program = "sudo kill all gearmand"
    if failed port 4730 protocol http then restart
从monit.log

[EST Nov 26 19:42:39] info     : 'gearmand' start: sudo
[EST Nov 26 19:42:39] error    : Error: Could not execute sudo
[EST Nov 26 19:43:09] error    : 'gearmand' failed to start

但是Monit说进程启动失败。有人知道怎么做吗?

check process gearman_daemon with pidfile /var/run/gearmand/gearmand.pid
    start program = "/bin/bash -c '/usr/sbin/gearmand -d --job-retries 3 --log-file /var/log/gearmand/gearmand.log --pid-file /var/run/gearmand/gearmand.pid --queue-type libsqlite3 --libsqlite3-db /var/tmp/gearman-queue.sqlite3'"
    stop program = "/bin/bash -c '/bin/killall gearmand'"

相关内容

  • 没有找到相关文章

最新更新