Add clean_session.log for rotation
This file is growing unbounded; let's rotate it root@ask:/srv/askbot-site/log# ls -lh -rw-r--r-- 1 root root 1.7G Apr 5 01:10 clean_session.log Change-Id: I051cd5868591bae021b61ab68f91ad9af16d6896
This commit is contained in:
parent
7abbdafc62
commit
a9dc8aa01e
|
@ -22,6 +22,15 @@ class askbot::site::log (
|
||||||
require => File["${site_root}/log"],
|
require => File["${site_root}/log"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { "${site_root}/log/clean_session.log":
|
||||||
|
ensure => present,
|
||||||
|
replace => 'no',
|
||||||
|
owner => 'root',
|
||||||
|
group => $www_group,
|
||||||
|
mode => '0664',
|
||||||
|
require => File["${site_root}/log"],
|
||||||
|
}
|
||||||
|
|
||||||
include ::logrotate
|
include ::logrotate
|
||||||
logrotate::file { 'askbot':
|
logrotate::file { 'askbot':
|
||||||
log => "${site_root}/log/askbot.log",
|
log => "${site_root}/log/askbot.log",
|
||||||
|
@ -35,4 +44,18 @@ class askbot::site::log (
|
||||||
],
|
],
|
||||||
require => File["${site_root}/log/askbot.log"],
|
require => File["${site_root}/log/askbot.log"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logrotate::file { 'clean_session':
|
||||||
|
log => "${site_root}/log/clean_session.log",
|
||||||
|
options => [
|
||||||
|
'compress',
|
||||||
|
'copytruncate',
|
||||||
|
'missingok',
|
||||||
|
'rotate 7',
|
||||||
|
'daily',
|
||||||
|
'notifempty',
|
||||||
|
],
|
||||||
|
require => File["${site_root}/log/clean_session.log"],
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue