Nagios通知升级

我已经正确configuration了Nagios,并且正在寻找一些通知来做一些(小小的)奇怪的事情。

我们想要做的是,前三个通知相隔5分钟,然后如果没有人回复,则相隔30分钟,接下来相隔60分钟。 我已经把所有这些都正常运行了。

我想要做的最后一部分是发生问题的地方。 我希望这些重复的通知不会在一夜之间(23:00到08:00之间)发送,但对于所有的新通知,都应该发送。 发生什么事情是因为第三次升级(60分钟的升级)直到23:00才正常工作,然后回到5分钟的等级,因为它在我设定的escalation_period之外。

我想我可以通过设置在“夜间”时间运行的另一个升级阶段来解决这个问题,但是这也不起作用。 这是我得到的configuration:

 define service{ use generic-service host_name mercury service_description ROB_TEST2 check_command check_pop contact_groups robonly } define serviceescalation{ host_name mercury service_description ROB_TEST2 first_notification 3 last_notification 5 notification_interval 30 contact_groups robonly } define serviceescalation{ host_name mercury service_description ROB_TEST2 first_notification 6 last_notification 9999 notification_interval 60 contact_groups robonly escalation_period daytime } define serviceescalation{ host_name mercury service_description ROB_TEST2 first_notification 6 last_notification 9999 notification_interval 60 contact_groups nobody escalation_period nighttime } 

有什么想法吗?

如果您在联系人中指定了时间段,我认为这会起作用。 定义联系人两次:一次在晚上通知,一次只在白天通知。

 define service{ use generic-service host_name mercury service_description ROB_TEST2 check_command check_pop contacts rob_daytime, rob_nighttime } define serviceescalation{ host_name mercury service_description ROB_TEST2 first_notification 3 last_notification 5 notification_interval 30 contacts rob_daytime, rob_nighttime } define serviceescalation{ host_name mercury service_description ROB_TEST2 first_notification 6 last_notification 9999 notification_interval 60 contacts rob_daytime } define contact{ contact_name rob_daytime service_notification_period daytime ... } define contact{ contact_name rob_nighttime service_notification_period nighttime ... } 

即使升级已经持续了几天,这应该会给你一个良好的睡眠。

注意 :我自己没有testing过;-)

如果您决定通过last_notification限制任何内容,请务必小心。 至less在我知道的版本中,进入升级不会重置相对无害的计数器。 从WARN到CRIT的转变也不会 – 这往往是致命的。