Good morning,
For the first time since I took over Nagios as an application, I am having space issues. My support team is stating that I have disk space warning in /usr/local/Nagios.
When I run the following command.
du -h /usr/local/nagios -d 10 | grep '[0-9\.]\+G'
3.3G /usr/local/nagios/share/perfdata
3.3G /usr/local/nagios/share
4.9G /usr/local/nagios/var/archives
5.0G /usr/local/nagios/var
8.3G /usr/local/nagios
Is there anything I can remove without causing issues, I have noticed that I have some older logs but when I search in previous posts the commands were for NagiosXI folder structure.
Thanks in advance. I always appreciate the help here.
Nagios and space
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Nagios and space
Hi,
Most everything in that folder you'll normally want to preserve. However, you may have a bunch of older rrd files that are no longer required and taking up space.
We have KB article on how to clean those up. Be sure to take a full backup before making any changes.
Nagios XI - Mass Delete Old RRD Files
Nagios XI backups can be really large, so make sure you check that as well. Those are normally found in the following directory (check the settings at Admin > System Backups).
Let us know if you have any questions.
Regards,
Benjamin
Most everything in that folder you'll normally want to preserve. However, you may have a bunch of older rrd files that are no longer required and taking up space.
We have KB article on how to clean those up. Be sure to take a full backup before making any changes.
Nagios XI - Mass Delete Old RRD Files
Nagios XI backups can be really large, so make sure you check that as well. Those are normally found in the following directory (check the settings at Admin > System Backups).
Code: Select all
/store/backups/nagiosxi
Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios and space
I appreciate this and did run the back up and deletion of the old files. I do find it odd that the Var/archives log is almost 5 gig and I have logs from 2018. That seems right? Perhaps I am keeping things too long?
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Nagios and space
Hi @jsalsbury,
By default, Nagios XI does not ever delete the Nagios logs. If you don't need to keep logs after a certain date, you can remove them or back them up to another server. This will impact the report look back period.
Let us know if you have any other questions.
--Benjamin
By default, Nagios XI does not ever delete the Nagios logs. If you don't need to keep logs after a certain date, you can remove them or back them up to another server. This will impact the report look back period.
Let us know if you have any other questions.
--Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios and space
There is no setting to keep/delete the logs, I just need to delete them manually?? Feels like perhaps a needed enhancement?
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Nagios and space
Hi @jsalsbury,
Since the Nagios.logs are a historical record and many customers must retain these for auditing, the system does not remove them. However, even on a large system, they do not require large amounts of disk space since they are flat text files.
If you'd like to remove old logs, you can use logrotate for that. It's already installed on the system and we use this to clean up Nagios XI-specific logs when they become too large.
logrotate(8) - Linux man page
HowTo: The Ultimate Logrotate Command Tutorial with 10 Example
Remove older rotated log files
Regards,
Benjamin
Since the Nagios.logs are a historical record and many customers must retain these for auditing, the system does not remove them. However, even on a large system, they do not require large amounts of disk space since they are flat text files.
If you'd like to remove old logs, you can use logrotate for that. It's already installed on the system and we use this to clean up Nagios XI-specific logs when they become too large.
logrotate(8) - Linux man page
HowTo: The Ultimate Logrotate Command Tutorial with 10 Example
Remove older rotated log files
Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!