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

Purging of old log files #9

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

tobixen
Copy link

@tobixen tobixen commented Aug 22, 2018

This pull request optionally lets the puppet module take care of log purging.

My typical use-case is to go back and investigate if there were any resource starvation bottle necks based on user reports or logging from the monitoring systems i.e. complaining on a slow web site. Short-lived resource starvation situations may cause significant problems with performance i.e. on a web server, but may go completely unnoticed on atop-logs with ten minutes interval, or munin graphs with 5 minutes interval, hence I'm typically setting the logging interval to 30s, sometimes even lower. With low log intervals the log files tend to take a lot of space, and with this use-case I typically don't need older logs than yesterdays log.

Some distributions tend to try to rotate the atop logs through logrotate, this sometimes causes problems, i.e. if the log file is rotated at 06:00 rather than midnight, this command will not work: "atop -r -b 04:30". I've also seen distributions where log rotation is done both by the init script and logrotate, that causes a mess. Hence if the purging is controlled by this puppet file, it also tries to remove any logrotation rules on atop, if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant