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

Log rotation not included #7

Open
tobixen opened this issue Feb 17, 2017 · 0 comments
Open

Log rotation not included #7

tobixen opened this issue Feb 17, 2017 · 0 comments

Comments

@tobixen
Copy link

tobixen commented Feb 17, 2017

Setting up some new hosts now with new and shiny puppet manifests, I'd like to use a standard module instead of using my own crud.

Would log rotation be within the scope of this module, and if so, should I try to work on a pull request?

I've had two general problems with atop:

  1. atop logs should be rotated exactly at midnight, otherwise commands like "atop -r -b 02:05" may not work as expected - this makes it slightly incompatible with standard log rotation. With modern distributions the init/service-script ensures atop logs to a log file with the date included in the file name, and restarts atop right after midnight - this seems to work well enough from the package. Still, i.e. on RHEL6 there is still a configuration file /etc/logrotate.d/atop which basically ensures all old logfiles have a .1-postfix. My experience is that it's best to ensure that /etc/logrotate.d/atop is absent in the puppet manifest.

  2. I usually tweak the logging interval down to 30s. We do have quite some hosts with small log partitions (we have quite some diskless hosts, running the OS from ramdisk). The atop log files takes a lot of space, and most often I typically want to inspect the log file from today or yesterday - while the distro packaging usually ensures that months of logs are kept. Since ordinary logrotation logics works quite badly with atop, I've found that the best practice probably is to just throw in a "find ... -delete"-job into the crontab. The number of days to keep should of course be configurable through puppet.

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

No branches or pull requests

1 participant