glusterfs/extras/glusterfs-logrotate
Amar Tumballi a7a7d3bd1c logrotate: utilize the new 'maxsize' option
Since logrotate 3.8.x version, a new option 'maxsize' is supported,
which helps in rotating the logs before the specified time if the
size exceeds maxsize limit. This should help in reducing the
overflow of gluster logs.

Updates: bz#1193929
Change-Id: Id33c34d72f1931e7996893de9338db667e1e900d
Signed-off-by: Amar Tumballi <amarts@redhat.com>
2018-09-19 03:29:59 +00:00

48 lines
758 B
Plaintext

# Rotate client logs
/var/log/glusterfs/*.log {
sharedscripts
weekly
maxsize 10M
minsize 100k
# 6 months of logs are good enough
rotate 26
missingok
compress
delaycompress
notifempty
postrotate
/usr/bin/killall -HUP glusterfs > /dev/null 2>&1 || true
/usr/bin/killall -HUP glusterd > /dev/null 2>&1 || true
endscript
}
# Rotate server logs
/var/log/glusterfs/bricks/*.log {
sharedscripts
weekly
maxsize 10M
minsize 100k
# 6 months of logs are good enough
rotate 26
missingok
compress
delaycompress
notifempty
postrotate
/usr/bin/killall -HUP glusterfsd > /dev/null 2>&1 || true
endscript
}
/var/log/glusterfs/samples/*.samp {
daily
rotate 3
sharedscripts
missingok
compress
delaycompress
}