/usr/local/nagios/var/nagios.log rotation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hbouma
Posts: 483
Joined: Tue Feb 27, 2018 9:31 am

/usr/local/nagios/var/nagios.log rotation

Post by hbouma »

How to I change the rotation of the nagios.log file? Currently, it is only keeping a few hours of data. We would like to keep additional data using the logrotate functionality, but I don't see where the current log rotation settings are kept.

We are on RHEL 7.6 VM's with Nagios XI 5.5.7/
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: /usr/local/nagios/var/nagios.log rotation

Post by lmiltchev »

Your log rotation method is probably set to "Hourly" in the nagios.cfg file. Change it to "Daily", and restart nagios service.

Code: Select all

log_rotation_method=d

Code: Select all

service nagios restart
or

Code: Select all

systemctl restart nagios
See the explanation of the log rotation method directives in the nagios.cfg file here:
https://assets.nagios.com/downloads/nag ... gmain.html

Hope this helps. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
hbouma
Posts: 483
Joined: Tue Feb 27, 2018 9:31 am

Re: /usr/local/nagios/var/nagios.log rotation

Post by hbouma »

Thank you. That is the information I needed.

You can close out the ticket.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: /usr/local/nagios/var/nagios.log rotation

Post by lmiltchev »

I am glad I could help! :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked