Rotate carbon-cache logs
carbon creates 3 different logs that it appends to. We should log rotate them, so that they don't take up all the disk. Also, the carbon-cache-a dir needs to be writable by www-data so that carbon can write the logs in the first place. Change-Id: I804ead080fa72053ecc6a46d962c7d30b2a165fb
This commit is contained in:
parent
7fc763ee13
commit
f4213b2175
|
@ -136,6 +136,48 @@ class graphite(
|
||||||
require => Package[$::apache::params::apache_name],
|
require => Package[$::apache::params::apache_name],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { '/var/log/graphite/carbon-cache-a':
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'www-data',
|
||||||
|
group => 'www-data',
|
||||||
|
require => File['/var/log/graphite'],
|
||||||
|
}
|
||||||
|
|
||||||
|
include logrotate
|
||||||
|
logrotate::file { 'querylog':
|
||||||
|
log => '/var/log/graphite/carbon-cache-a/query.log',
|
||||||
|
options => [
|
||||||
|
'compress',
|
||||||
|
'copytruncate',
|
||||||
|
'missingok',
|
||||||
|
'rotate 7',
|
||||||
|
'daily',
|
||||||
|
'notifempty',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
logrotate::file { 'listenerlog':
|
||||||
|
log => '/var/log/graphite/carbon-cache-a/listener.log',
|
||||||
|
options => [
|
||||||
|
'compress',
|
||||||
|
'copytruncate',
|
||||||
|
'missingok',
|
||||||
|
'rotate 7',
|
||||||
|
'daily',
|
||||||
|
'notifempty',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
logrotate::file { 'createslog':
|
||||||
|
log => '/var/log/graphite/carbon-cache-a/creates.log',
|
||||||
|
options => [
|
||||||
|
'compress',
|
||||||
|
'copytruncate',
|
||||||
|
'missingok',
|
||||||
|
'rotate 7',
|
||||||
|
'daily',
|
||||||
|
'notifempty',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
file { '/etc/graphite':
|
file { '/etc/graphite':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue