Page 1 of 1

Nagios database optimize

Posted: Tue Jan 22, 2019 2:27 pm
by vmesquita
Hello,

We realized that the problem of the space being filled and release was related to Nagios Database optimzation. The folder /var/lib/mysql/nagios grows to about twice the file nagios_logentries.* combined every time the optimization runs. We changed it to run every 120 minutes instead of 60 minutes and now it seems to take a bit more space when is running the process, and then the space is released. Is this the normal behavior?

Would it be possible to run this optimizations only once a day, at night? I don't see any option to set the time when the database optimization will run, only the interval.

Re: Nagios database optimize

Posted: Tue Jan 22, 2019 3:41 pm
by lmiltchev
We realized that the problem of the space being filled and release was related to Nagios Database optimzation. The folder /var/lib/mysql/nagios grows to about twice the file nagios_logentries.* combined every time the optimization runs.
Try reducing the number of days the historical data is kept in the DB. This should limit the /var/lib/mysql/nagios growth.
We changed it to run every 120 minutes instead of 60 minutes and now it seems to take a bit more space when is running the process, and then the space is released. Is this the normal behavior?
This is normal and it shouldn't be an issue.
Would it be possible to run this optimizations only once a day, at night? I don't see any option to set the time when the database optimization will run, only the interval.
You can set up the "Optimize Interval" to 1440 to make optimization run once a day, but there is no way (that I am aware of anyway) to set up the optimization to run at a specific time, e.g. at night.

Re: Nagios database optimize

Posted: Thu Jan 24, 2019 8:41 am
by vmesquita
Where the information stored in the table nagios_logentries.* can be found on the XI interface?

Re: Nagios database optimize

Posted: Thu Jan 24, 2019 10:31 am
by lmiltchev
You can view the data by going to Reports > Available Reports > Even Log

If you were asking about where to set up the max time in days to keep log entries, it's under the "Performance Settings" page, "NDO Database" section (the "Max Log Entries Age" field).