小编Joe*_*haw的帖子

可以将 Monit 配置为从不取消监视/超时服务吗?

如果服务失败几次,Monit 似乎会放弃重新启动服务,并取消对其进行监控。我在文档中找不到任何关于时间或原因的细节。

我的 Monit 配置将设置如下:

set daemon 10
set logfile /var/log/monit.log
set statefile /var/lib/monit/monit.state
set alert foo@example.com not { nonexist, action, instance }
include /etc/monit/conf.d/*
Run Code Online (Sandbox Code Playgroud)

这是我正在使用的 Monit 规则集的示例:

check process myservice
  with pidfile /var/run/myservice/myservice.pid
  start program = "/home/myservice/current/start-myservice.sh"
    as uid myservice and gid myservice
  stop program = "/home/myservice/current/stop-myservice.sh"
    as uid myservice and gid myservice
  mode active
Run Code Online (Sandbox Code Playgroud)

在我的环境中,我希望它无限期地继续尝试轮询间隔。有没有办法将 monit 配置为从不停止监视服务,即使它没有成功启动?

linux monitoring monit

8
推荐指数
2
解决办法
6555
查看次数

标签 统计

linux ×1

monit ×1

monitoring ×1