小编kak*_*ppa的帖子

Monit - 如何在停止和启动之间添加延迟

我想知道是否可以在停止/启动方法之间添加延迟。这主要是因为它需要至少 10 秒的延迟才能关闭所有打开的套接字连接并优雅地关闭服务器套接字以重新启动。

这是我的监控脚本

set logfile /var/log/monit.log
check process test.sh with pidfile /home/svcs/test/pid/app.pid
start program = "/etc/init.d/test.sh start" with timeout 60 seconds
stop program = "/etc/init.d/test.sh stop" with timeout 60 seconds
if failed host xx.xx.com port 443
type tcpSSL protocol http with timeout 15 seconds retry 3 then restart
alert xx@xx.com
Run Code Online (Sandbox Code Playgroud)

谢谢

monit

5
推荐指数
1
解决办法
2383
查看次数

标签 统计

monit ×1