[Nagios-users] [PATCH] reduce notification load; fix $NOTIFICATIONRECIPIENTS$ macro #98

Andreas Ericsson ae at op5.se
Mon Nov 21 20:56:38 CET 2011


On 11/01/2011 02:05 PM, Michael Friedrich wrote:
> 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
> 

I've started looking into this patch right now. It's good to get that
issue (#98) fixed, but I fail to see any noticeable performance
improvement. All contacts potentionally viable for being contacted are
still looked at, but the difference with this patch is that it checks
the viability before shipping it off to add_notification(), which does
fix issue 98 but at the expense of quite a lot of code duplication.

I'll see if I can improve on that a bit.

> 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.
> 

Not anymore, but I get the gist of it so I'll do something with it that
keeps the spirit of the patch, as it were.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d




More information about the Developers mailing list