[Nagios-devel] Performance issue with notifications (with patch)
Posted: Tue May 27, 2008 1:02 pm
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/o ... h?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: [email protected]
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 post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
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/o ... h?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: [email protected]
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 post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]