Page 1 of 1

Manage logs on MY SQL server

Posted: Mon Jan 20, 2020 9:20 am
by jatindeepsharma
Hello Team,
nagios_logentries table on my SQL server is getting increased day by day, how can i manage this table? size of this table is going upto 42GB which slow down front end of NAGIOS.please suggest.

Path of nagios logs.
/home/mysql/mysql/nagios

Re: Manage logs on MY SQL server

Posted: Mon Jan 20, 2020 10:18 am
by mcapra
Here's the official documentation for optimizing/tuning the MySQL database for Nagios XI:
https://assets.nagios.com/downloads/nag ... zation.pdf

My memory may be failing me, but I think you want to tune the "Max Log Entries Age" of the NDOUtils database settings.

I'd also check to make sure the database maintenance tasks are running, as these are responsible for cleaning-up the nagios_logentries table among others. Admin->System Status:
https://support.nagios.com/kb/article.php?id=70

If you have many checks in an unhealthy state, this table's size can increase quite rapidly as all of the checks are hitting their retry interval (60 seconds by default for most checks) rather than their usual check interval (300 seconds by default for most checks).

I'd suggest preparing a system profile should one of the techs ask for it:
https://assets.nagios.com/downloads/nag ... zation.pdf

Re: Manage logs on MY SQL server

Posted: Mon Jan 20, 2020 3:42 pm
by mbellerue
Thanks for jumping in Matt!

jatindeepsharma, did Matt's answer provide you with the information needed to resolve your issue?