[PATCH] Distinguish between warning and critical notifications
Mark Gius
mgius at createspace.com
Wed Nov 18 01:02:34 CET 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagios_escalations.patch
Type: text/x-patch
Size: 20244 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20091117/80333331/attachment.bin>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list