使用大神监控工具监控memcache
我正在尝试使用God监控工具来监控memcached。这是我的 memcached.god 文件:
God.watch do |w|
w.name = "memcached"
w.interval = 30.seconds # default
w.start = "/etc/init.d/memcached start"
w.stop = "killall memcached"
w.restart = "/etc/init.d/memcached restart && sleep 1"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
w.pid_file = "/var/run/memcached.pid"
w.uid = "memcache"
# clean pid files before start if necessary
w.behavior(:clean_pid_file)
w.start_if do |start|
start.condition(:process_running) do |c| # check if process is running
c.interval = 5.minute
c.running = false
end
end
end
god load -c /path/to/memcached.god 不会给出任何错误。但是当我运行 god status 时,我没有看到 memcached,也没有看到 god log memcached 重新运行,
Please wait...
No such watch
我确信 god 监控正在运行,因为它对于 apache2 工作得很好。知道为什么我遇到这个问题吗?
I am trying to monitor memcached using god monitoring tool. Here is my memcached.god file:
God.watch do |w|
w.name = "memcached"
w.interval = 30.seconds # default
w.start = "/etc/init.d/memcached start"
w.stop = "killall memcached"
w.restart = "/etc/init.d/memcached restart && sleep 1"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
w.pid_file = "/var/run/memcached.pid"
w.uid = "memcache"
# clean pid files before start if necessary
w.behavior(:clean_pid_file)
w.start_if do |start|
start.condition(:process_running) do |c| # check if process is running
c.interval = 5.minute
c.running = false
end
end
end
god load -c /path/to/memcached.god does not give any error. But when I run god status I don't see memcached and also god log memcached retruns
Please wait...
No such watch
I am sure god monitoring is running as it works fine for apache2. Any idea why an I having this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您现在可能已经明白了这一点,但为了将来的参考,这是运行它的方法:
You probably figured this out by now, but for future reference this is how to run it:
我认为你不想要 -c。尝试:
至少,帮助是这么说的......
I don't think you want the -c. Try:
At least, that is what the help says...