You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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.
The text was updated successfully, but these errors were encountered:
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:
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.
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.
The text was updated successfully, but these errors were encountered: