gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 05:08:42 24 4
gpt4 key购买 nike

所以监控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

来自监控日志

[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'"

关于gearman - 如何通过 Monit 监控 gearmand 守护进程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8268568/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com