diff options
Diffstat (limited to 'sys-cluster/ceph/files/ceph.logrotate-r2')
-rw-r--r-- | sys-cluster/ceph/files/ceph.logrotate-r2 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sys-cluster/ceph/files/ceph.logrotate-r2 b/sys-cluster/ceph/files/ceph.logrotate-r2 new file mode 100644 index 0000000..74d96e2 --- /dev/null +++ b/sys-cluster/ceph/files/ceph.logrotate-r2 @@ -0,0 +1,33 @@ +# +# /etc/logrotate.d/ceph +# + +/var/log/ceph/*.log +{ + rotate 7 + daily + compress + sharedscripts + prerotate + for dmn in $(cd /run/ceph && ls *.asok 2>/dev/null); do + ceph --admin-daemon /run/ceph/${dmn} log flush 2>/dev/null >/dev/null + done + endscript + postrotate + for dmn in $(cd /run/ceph && ls *.asok 2>/dev/null); do + ceph --admin-daemon /run/ceph/${dmn} log reopen 2>/dev/null >/dev/null + done + endscript + missingok +} + +/var/log/ceph/console/*.log +{ + rotate 7 + daily + compress + missingok + copytruncate +} +# +# vim:ft=conf:ts=4:sts=4:sw=4:noet: |