Page 1 of 1

Nagios 4.4.0+1 Number of Comments is redoubling each reload

Posted: Tue Jun 26, 2018 7:24 am
by christimpaler
Hi folks,
a few days ago I updated to nagios 4.4.0 and today I installed version 4.4.1, but the problem (maybe a bug?) still remains.

When a comment is added to a service (due to problem acknowledgement) the number of comments ist redoubling each time the nagios daemon is reloaded (this does not happen when restarting the nagios daemon). So after a certain amount of time a service can own 8192 or more comments and nagios is slowing down daramatically. Meanwhile the files "status.dat" and "retention.dat" continue growing. Usually these files are 8 MB, but with all the comments they grow to 500 MB and more.

We use RHEL 7.5.

DO you have any similar experiences? We have two installations with the same behaviour.
Best regards

C.I.

Re: Nagios 4.4.0+1 Number of Comments is redoubling each rel

Posted: Wed Jun 27, 2018 4:05 pm
by cdienger
Thanks for bringing this to our attention. I've been able to reproduce and will look into it.

Re: Nagios 4.4.0+1 Number of Comments is redoubling each rel

Posted: Wed Jun 27, 2018 4:47 pm
by bheden
Fixed in this commit:

https://github.com/NagiosEnterprises/na ... 990ed88c95

A patch for you would look something like:

Code: Select all

sed -i 's/cleanup_downtime_data();/cleanup_downtime_data();free_comment_data();/' base/nagios.c
And then recompile. Or you could simply download the current maint branch from GitHub.

Thank you for pointing this out.

Re: Nagios 4.4.0+1 Number of Comments is redoubling each rel

Posted: Thu Jun 28, 2018 12:56 am
by christimpaler
Thank you for this quick solution. I recompiled and now the number of comments remains unchanged.
Topic can be closed.
Have a nice day.
C.I.

Re: Nagios 4.4.0+1 Number of Comments is redoubling each rel

Posted: Thu Jun 28, 2018 7:34 am
by scottwilkerson
Excellent! Locking