为什么这个monit配置提醒语法不会导致重复警报?

时间:2017-01-17 12:18:23

标签: monit

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

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连接到网络的计算机,如果不是则会发出警报?

1 个答案:

答案 0 :(得分:0)

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

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
相关问题