Project

General

Profile

« Previous | Next » 

Revision 6ba1df9a

Added by Benoît PECCATTE over 6 years ago

Fixes #10912: Duration of logrotate for /var/log/rudder/ is too long making /var/log too big

View differences:

initial-promises/node-server/server-roles/1.0/logrotate-check.cf
string => "reload",
policy => "overridable";
"logrotate_duration" string => "30";
ubuntu::
"syslog_user" string => "syslog";
initial-promises/node-server/server-roles/logrotate.conf/rudder
/var/log/rudder/apache2/*.log {
daily
missingok
rotate 30
rotate ${root_logrotate_check.logrotate_duration}
compress
notifempty
create ${root_logrotate_check.syslog_file_mode} ${root_logrotate_check.syslog_user} ${root_logrotate_check.syslog_group}
......
/var/log/rudder/reports/*.log {
daily
missingok
rotate 30
rotate ${root_logrotate_check.logrotate_duration}
compress
notifempty
create ${root_logrotate_check.syslog_file_mode} ${root_logrotate_check.syslog_user} ${root_logrotate_check.syslog_group}
......
/var/log/rudder/reports/*.log {
daily
missingok
rotate 30
rotate ${root_logrotate_check.logrotate_duration}
compress
notifempty
create ${root_logrotate_check.syslog_file_mode} ${root_logrotate_check.syslog_user} ${root_logrotate_check.syslog_group}
......
/var/log/rudder/ldap/slapd.log {
daily
missingok
rotate 30
rotate ${root_logrotate_check.logrotate_duration}
compress
notifempty
create ${root_logrotate_check.syslog_file_mode} ${root_logrotate_check.syslog_user} ${root_logrotate_check.syslog_group}
......
/var/log/rudder/ldap/slapd.log {
daily
missingok
rotate 30
rotate ${root_logrotate_check.logrotate_duration}
compress
notifempty
create ${root_logrotate_check.syslog_file_mode} ${root_logrotate_check.syslog_user} ${root_logrotate_check.syslog_group}
techniques/system/server-roles/1.0/logrotate-check.st
string => "reload",
policy => "overridable";
pass1.!duration_configured::
"logrotate_duration" string => "30";
pass1.duration_configured::
"logrotate_duration" string => "${rudder_parameters.log_duration}";
ubuntu::
"syslog_user" string => "syslog";
......
"syslog_rotation_method" string => "rotate";
classes:
"pass2" expression => "pass1";
"pass1" expression => "any";
"duration_configured" expression => isvariable("rudder_parameters.log_duration");
files:
pass2::
"/etc/logrotate.d/rudder"
create => "true",
edit_defaults => empty_backup,
techniques/system/server-roles/1.0/rudder-logrotate.st
/var/log/rudder/apache2/*.log {
daily
missingok
rotate 30
rotate ${root_logrotate_check.logrotate_duration}
compress
notifempty
create ${root_logrotate_check.syslog_file_mode} ${root_logrotate_check.syslog_user} ${root_logrotate_check.syslog_group}
......
/var/log/rudder/reports/*.log {
daily
missingok
rotate 30
rotate ${root_logrotate_check.logrotate_duration}
compress
notifempty
create ${root_logrotate_check.syslog_file_mode} ${root_logrotate_check.syslog_user} ${root_logrotate_check.syslog_group}
......
/var/log/rudder/reports/*.log {
daily
missingok
rotate 30
rotate ${root_logrotate_check.logrotate_duration}
compress
notifempty
create ${root_logrotate_check.syslog_file_mode} ${root_logrotate_check.syslog_user} ${root_logrotate_check.syslog_group}
......
/var/log/rudder/ldap/slapd.log {
daily
missingok
rotate 30
rotate ${root_logrotate_check.logrotate_duration}
compress
notifempty
create ${root_logrotate_check.syslog_file_mode} ${root_logrotate_check.syslog_user} ${root_logrotate_check.syslog_group}
......
/var/log/rudder/ldap/slapd.log {
daily
missingok
rotate 30
rotate ${root_logrotate_check.logrotate_duration}
compress
notifempty
create ${root_logrotate_check.syslog_file_mode} ${root_logrotate_check.syslog_user} ${root_logrotate_check.syslog_group}

Also available in: Unified diff