Nagios database optimize

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Nagios database optimize

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios database optimize

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Re: Nagios database optimize

Post by vmesquita »

Where the information stored in the table nagios_logentries.* can be found on the XI interface?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios database optimize

Post 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).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked