Performance issue with notifications (with patch)
Duncan Ferguson
duncan.ferguson at altinity.com
Tue May 27 23:01:46 CEST 2008
Hiya,
We recently discovered a performance issue within the notification
logic of nagios. Basically, when a notification is raised the process
is:
create list of all valid contacts interested in notification
If the list is not null
create generic macros
for each contact
create contact macros
create summary macros
check if contact should be notified and then notify the contact
In our case all the macros were getting generated and then the code
would work out the contact didn't need to be notified, so there was a
lot of unnecessary processing with nagios was taking between 3 and 7
seconds to complete the process for one notification.
I have amended the code so that
create list of all valid contacts interested in notification AND
should be notified
If the list is not null
create generic macros
for each contact
create contact macros
create summary macros
notify the contact
This cuts down on the amount of processing necessary as the expensive
(but useful) macros aren't generated unnecessarily.
Here is the patch (against Nagios 2.10): http://trac.opsview.org/browser/trunk/opsview-base/patches/nagios_reduce_notifications_load.patch?rev=1142
(link to download in original format at bottom of page)
Duncs
--
Duncan Ferguson
Senior Developer, Altinity Limited
http://www.altinity.com
Tel: +44 (0)870 787 9243
US: +1 866 879 9184
Fax: +44 (0)845 280 1725
Skype: duncan_j_ferguson
MSN: duncan.ferguson at altinity.com
The contents of this email and any files transmitted with it are
confidential and intended solely for the use of the individuals to
whom it is addressed.
If you are not the intended recipient or have received this e-mail in
error please notify the sender and delete this e-mail immediately.
Any unauthorised copying, disclosure or distribution of the material
in this e-mail is strictly prohibited.
Altinity Limited | 404 Seven Sisters Road | London | N4 2LX | United
Kingdom
Registered in England and Wales under company number 4743767
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
More information about the Developers
mailing list