[PATCH] reduce notification load; fix $NOTIFICATIONRECIPIENTS$ macro #98
Michael Friedrich
michael.friedrich at univie.ac.at
Tue Nov 1 14:05:33 CET 2011
hi,
recently we've been debugging on team icinga in the middle of
notifications and macros, and while investigating on a users problem,
we've digged a bit deeper into the notification viability checks,
resulting in deeper analysis of an Opsview patch to reduce the
notification load significantly by moving the viability checks from the
actual notification into the creation of the contacts notified, passing
only a list of 'qualified' contacts to the actual notification logic.
the only thing to remark over here is that the checks against the valid
notification_period now happen sooner, and not actually when the
notification is sent to each contact.
while implementing that patch into current code (needs some macro
passing with current code), we did remember nagios bug #98 where the
$NOTIFICATIONRECEIPIENTS$ macro is demanded to be only populated with
the actual contacts to be notified, but not all of those assigned to the
host/service. while this is considered to be a real bug, further
investigation showed that thanks to the viability checks before calling
add_notification(), contacts won't be added to that macro as the macro
logic happens within that function too.
so by applying the attached git patch, you will a. reduce notification
load and b. fix the $NOTIFICATIONRECEIPIENTS$ macro holding all
contacts, but not the viable contacts.
since the code remains actually the same on icinga and nagios in this
stage, the tests can be found at the icinga dev tracker as usual.
https://dev.icinga.org/issues/1744
https://dev.icinga.org/issues/2023
kudos to Opsview Team for their initial patch as well as Icinga
Development Team for the further analysis on the macro bug.
feel free to apply, matches against latest HEAD.
kind regards,
Michael
--
DI (FH) Michael Friedrich
Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria
email: michael.friedrich at univie.ac.at
phone: +43 1 4277 14359
mobile: +43 664 60277 14359
fax: +43 1 4277 14338
web: http://www.univie.ac.at/zid
http://www.aco.net
Lead Icinga Core& IDOUtils Developer
http://www.icinga.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-reduce-notification-load-fix-NOTIFICATIONRECIPIENTS-.patch
Type: text/x-diff
Size: 15192 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20111101/e6367af1/attachment.patch>
-------------- next part --------------
------------------------------------------------------------------------------
RSA® Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Users
mailing list