puppet: Configure smokescreen for 14 days of logs, via logrotate.

supervisord's log rotation is only "every x bytes" which is not a good
enough policy for tracking auditing logs.  The default is also 10 logs
of 50MB, which is very much not enough for active instances.

Switch to tracking 14 days of daily logs.
This commit is contained in:
Alex Vandiver 2023-07-13 12:49:57 -04:00 committed by Tim Abbott
parent 695295421a
commit 149bea8309
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,11 @@
/var/log/zulip/smokescreen.log
{
missingok
rotate 14
daily
compress
delaycompress
notifempty
copytruncate
create 644 zulip zulip
}

View File

@ -49,4 +49,12 @@ class zulip::smokescreen {
content => template('zulip/supervisor/smokescreen.conf.erb'), content => template('zulip/supervisor/smokescreen.conf.erb'),
notify => Service[supervisor], notify => Service[supervisor],
} }
file { '/etc/logrotate.d/smokescreen':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/zulip/logrotate/smokescreen',
}
} }

View File

@ -6,3 +6,5 @@ autorestart=true
user=zulip user=zulip
redirect_stderr=true redirect_stderr=true
stdout_logfile=/var/log/zulip/smokescreen.log stdout_logfile=/var/log/zulip/smokescreen.log
stdout_logfile_maxbytes=0
stdout_logfile_backups=0