PID 更改时禁用监控警报

aur*_*els 15 monitoring monit alert

当您使用 Monit 通过其 pid 监视进程时,例如:

check process blop with pidfile /.../blop.pid
      start program = "..."
      stop  program = "..."
Run Code Online (Sandbox Code Playgroud)

当 pidfile 更改时,您会收到警报。

您如何禁用此警报?例如,如果您只想知道进程何时无法重新启动。

Kvi*_*sle 21

您可以通过设置本地警报语句来禁用此警报。这在此处有详细记录:http : //mmonit.com/monit/documentation/monit.html#setting_a_local_alert_statement

这应该这样做:

check process blop with pidfile /.../blop.pid
    alert recipient@address.com but not on { pid }
    start program = "..."
    stop  program = "..."
Run Code Online (Sandbox Code Playgroud)