glusterfs/extras/glusterfs-georep-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

62 lines
1.2 KiB
Plaintext

/var/log/glusterfs/geo-replication/*/*.log {
sharedscripts
weekly
maxsize 10M
minsize 100k
# 6 months of logs are good enough
rotate 26
missingok
compress
delaycompress
notifempty
postrotate
for pid in `ps -aef | grep glusterfs | egrep "\-\-aux-gfid-mount" | awk '{print $2}'`; do
/usr/bin/kill -HUP $pid > /dev/null 2>&1 || true
done
endscript
}
/var/log/glusterfs/geo-replication-slaves/*.log {
sharedscripts
weekly
maxsize 10M
minsize 100k
# 6 months of logs are good enough
rotate 26
missingok
compress
delaycompress
notifempty
postrotate
for pid in `ps -aef | grep glusterfs | egrep "\-\-aux-gfid-mount" | awk '{print $2}'`; do
/usr/bin/kill -HUP $pid > /dev/null 2>&1 || true
done
endscript
}
/var/log/glusterfs/geo-replication-slaves/*/*.log {
sharedscripts
weekly
maxsize 10M
minsize 100k
# 6 months of logs are good enough
rotate 26
missingok
compress
delaycompress
notifempty
postrotate
for pid in `ps -aef | grep glusterfs | egrep "\-\-aux-gfid-mount" | awk '{print $2}'`; do
/usr/bin/kill -HUP $pid > /dev/null 2>&1 || true
done
endscript
}