【问题标题】:Why is this monit config reminder syntax not resulting in repeated alerts?为什么此 monit config 提醒语法不会导致重复警报?
【发布时间】:2017-01-17 12:18:23
【问题描述】:

我已经设置了一个 monit 配置来检查 jenkins 构建节点是否已连接(它的 VPN 连接仍然正常),方法是检查它在网络内部的服务器上的 VPN IP 地址。当计算机未连接时,它似乎至少可以工作一次。但它似乎只在蓝月亮中触发一次,而不是像我想要的那样反复触发。

check host JenkinsMacOSXNode with address 192.168.237.10
if failed icmp type echo
  count 5 with timeout 5 seconds
  2 times within 3 cycles
then alert with reminder on 3 cycles
alert admin@ourdomain.com

当预期的计算机无法 ping 通时,重复发送警报的上述语法是否正确?

如果下一个问题是循环设置的频率,/etc/monit/monitrc 表示set daemon 120,因此每个循环应该是每 2 分钟一次

是否有更好的方法来完成检查应通过 VPN 连接到网络的计算机并在未连接时发出警报?

【问题讨论】:

    标签: monit


    【解决方案1】:

    尝试在测试前使用提醒定义设置警报:

    set alert admin@ourdomain.com with reminder on 3 cycles
    check host JenkinsMacOSXNode with address 192.168.237.10
    if failed icmp type echo
      count 5 with timeout 5 seconds
      2 times within 3 cycles
    then alert
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-02
      • 1970-01-01
      • 2015-12-11
      • 2011-01-27
      • 1970-01-01
      • 2015-08-02
      • 1970-01-01
      相关资源
      最近更新 更多