Page 1 of 1

Nagios XI log files growing

Posted: Mon Jun 07, 2021 1:14 pm
by dkstuart23
We have an instance of Nagios XI running and I have noticed that the log files in nagiosxi/var are growing quite large and do not roll over like I would expect. I have questions: 1) is there somewhere that you set the logging verbosity? 2) is there a way to truncate the log files? 3) is there a place in the system to set the log files accumulate for 'x' days then roll over?
TIA,
Doug

Re: Nagios XI log files growing

Posted: Tue Jun 08, 2021 10:29 am
by benjaminsmith
Hi Doug,

Nagios XI uses logrotate to keep the log files in check and archive them. I suspect the service is not running or there is some kind of permission issue.

You can run logrotate with debug output using the following command to help troubleshoot the issue.

Code: Select all

logrotate -d /etc/logrotate.d/nagiosxi
Also, make sure the corn daemon is running is running.

Code: Select all

systemctl status crond
Good luck, please post any error output for help troubleshooting.
--Benajmin

Re: Nagios XI log files growing

Posted: Wed Jul 07, 2021 8:05 am
by dkstuart23
sorry, forgot to post this sooner. Log rotate was not set up properly. Actually, I think that one of the Nagios log files was put in two places in the config file and that appears to have been what was causing the problem.

Re: Nagios XI log files growing

Posted: Wed Jul 07, 2021 4:44 pm
by benjaminsmith
Hi @dkstuart23,
sorry, forgot to post this sooner. Log rotate was not set up properly.
No problem. Glad to hear it's working better now.

--Benjamin