Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document logs rotation and compression setup #243

Closed
laeti-tia opened this issue Jun 1, 2023 · 8 comments
Closed

Document logs rotation and compression setup #243

laeti-tia opened this issue Jun 1, 2023 · 8 comments
Assignees

Comments

@laeti-tia
Copy link
Member

We had reports of disk space exhaustion in some hosts migrated to 5.0. Some users were reporting OpenSearch logs were not compressed and others reporting some Apache logs were not rotated.

We need more information to be able to debug this further. Maybe @rhclopes can give us more information.

@rhclopes
Copy link

rhclopes commented Jun 5, 2023

Hi,

The logs are not compressed after rotation in

  • /var/log/perfsonar/
  • /var/log/pscheduler/
  • /var/log/httpd/
  • /var/log/messages

I have seen an increase in disk space usage of 1G a day with several perfsonar toolkit hosts and maddash hosts failing by running out of space.

It should an easy fix to correct logrotate to compress all files. Alternatively, advise admins to do so.

Regards,
Raul

@laeti-tia
Copy link
Member Author

Thanks Raul, were these CentOS-7 systems? Upgraded from 4.4.x? Were the logs compressed before upgrade?

@arlake228 arlake228 assigned arlake228 and laeti-tia and unassigned arlake228 Jun 5, 2023
@rhclopes
Copy link

rhclopes commented Jun 5, 2023

Hi Laetitia,

Yes, they are all ps 5 on CentOS7. In all cases, updated from perfSONAR 4.4.

Raul

@laeti-tia laeti-tia assigned adrialla and unassigned laeti-tia Jun 7, 2023
@laeti-tia
Copy link
Member Author

It is confirmed that on a 4.4.x CentOS7 host, the logs in those directories are not compressed:

/var/log/perfsonar/
/var/log/pscheduler/
/var/log/httpd/

The default CentOS7 logrotate.conf also has the compress setting commented out:

# uncomment this if you want your log files compressed
#compress

@arlake228
Copy link
Contributor

Chatted about this and next action is to find best place to document how to enable compression on el7 or any other OS with it disabled by default.

@laeti-tia laeti-tia assigned szymontrocha and unassigned adrialla Jun 16, 2023
@laeti-tia laeti-tia changed the title Review logs rotation setup Document logs rotation and compression setup Jun 16, 2023
@szymontrocha
Copy link
Contributor

Do we recommend just enabling compress option for the whole system in logrotate.conf? Otherwise we would have to specify a specific logrotate config

@laeti-tia
Copy link
Member Author

@szymontrocha Yes I think a general compression doesn't hurt. That's the way it's done by default on Debian and Ubuntu systems. That's also the way you save the most disk space.

@szymontrocha
Copy link
Contributor

This may be as simple as the following FAQ entry:

Enabling log compression with logrotate.conf
Sometimes, log files can grow bigger and consume disk space even before their rotation. Logrotate is a system utility installed by default and is configured to handle log rotation for all installed packages and applications. In order to enable system-wide log files compression change default settings in /etc/logrotate.conf and uncomment compress option. This implies that rotated files will be compressed with log files having a .gz file extension.

@szymontrocha szymontrocha transferred this issue from perfsonar/project Feb 7, 2024
@github-project-automation github-project-automation bot moved this from Ready to Done in perfSONAR Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants