From: Mark G. <mg...@cr...> - 2009-11-18 00:36:13
|
This patch is to address the issue I asked about in this thread: http://article.gmane.org/gmane.network.nagios.user/65141 Currently, Nagios does not distinguish between warnings and criticals in service escalations. This can cause problems with escalation chains as shown by this example. define serviceescalation { host hostname service servicename first_notification 3 last_notification 0 escalation_options c,u,r } Currently, a service that is in WARNING for 3 notifications, then enters CRITICAL will match this service escalation. The behavior I am looking for (and was expecting) is that after the 3rd critical or unknown, match this escalation. The attached patch (patches cleanly to 3.0.6 and HEAD as of yesterday) adds the ability to specify service escalations that match after a specified number of critical or warning notifications. IE: define serviceescalation { host hostname service servicename first_critical_notification 3 last_critical_notification 0 escalation_options c,u,r } The patch adds 4 configuration directives to service escalations definitions: first_warning_notification # last_warning_notification # first_critical_notification # last_critical_notification # Behavior is identical to (first|last)_notification, except that they check against the count of warning/critical notifications instead of the number of total notifications. The behavior of the current directives is unchanged. Existing deployments should not need to be modified with this patch applied. I've run some tests for this patch off the 3.0.6 stable release, and it seems to be working fine. Ran overnight without any complaints from the logs, and the behavior is as I expect it to be. Suggestions for improvements welcome. -Gius |