Skip to content

Commit

Permalink
gluster: Add logrotate (#1709)
Browse files Browse the repository at this point in the history
Reloads syslog-ng when rotating glusterfs.log.
  • Loading branch information
paladox committed Mar 15, 2021
1 parent 0ed3b8b commit 6d6911e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/gluster/files/glusterfs-common.logrotate.conf
@@ -0,0 +1,12 @@
/var/log/glusterfs/*.log /var/log/glusterfs/bricks/*.log {
daily
rotate 7
delaycompress
compress
copytruncate
notifempty
missingok
postrotate
[ ! -f /var/run/glusterd.pid ] || kill -HUP `cat /var/run/glusterd.pid` ; killall -HUP glusterfs > /dev/null 2>&1 ; invoke-rc.d syslog-ng-ctl reload >/dev/null 2>&1 || true
endscript
}
5 changes: 5 additions & 0 deletions modules/gluster/manifests/init.pp
Expand Up @@ -114,5 +114,10 @@
program_name => 'glusterd',
}

logrotate::conf { 'glusterfs-common':
ensure => present,
source => 'puppet:///modules/gluster/glusterfs-common.logrotate.conf',
}

include prometheus::gluster_exporter
}

0 comments on commit 6d6911e

Please sign in to comment.