Last active
October 22, 2023 12:06
-
-
Save cemeyer/d4a10052d7bbb8a96977eaeeb066fd56 to your computer and use it in GitHub Desktop.
Sane logrotate.conf settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create new (empty) log files after rotating old ones | |
create | |
# use date as a suffix of the rotated file | |
dateext | |
compress | |
compresscmd /bin/zstd | |
compressext .zst | |
compressoptions -18 -T0 --rm | |
uncompresscmd /bin/unzstd | |
rotate 30 | |
nodelaycompress | |
nomail | |
notifempty | |
size 10M | |
# RPM packages drop log rotation information into this directory | |
include /etc/logrotate.d | |
... | |
# I'd also suggest adding logrotate to /etc/cron.hourly in addition to cron.daily, because | |
# why the hell should you wait 23H if your log is oversized? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment