Add changes to conntrackd logging
* Reduce time of storing conntrackd-stats logs to 1 day * Enable conntrackd log with storing for 7 days Change-Id: I5afc09a14c17eba4fa96ffb8f89228340c96bf67 Closes-Bug: 1466006
This commit is contained in:
parent
be2aa0818e
commit
a2a17cc181
@ -261,7 +261,7 @@ General {
|
||||
# Logfile: on (/var/log/conntrackd.log), off, or a filename
|
||||
# Default: off
|
||||
#
|
||||
LogFile off
|
||||
LogFile on
|
||||
|
||||
#
|
||||
# Syslog: on, off or a facility name (daemon (default) or local0..7)
|
||||
|
22
deployment/puppet/openstack/templates/95-conntrackd.conf.erb
Normal file
22
deployment/puppet/openstack/templates/95-conntrackd.conf.erb
Normal file
@ -0,0 +1,22 @@
|
||||
/var/log/conntrackd-stats.log {
|
||||
daily
|
||||
rotate 1
|
||||
missingok
|
||||
copytruncate
|
||||
|
||||
postrotate
|
||||
invoke-rc.d conntrackd restart > /dev/null
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/conntrackd.log {
|
||||
daily
|
||||
rotate 7
|
||||
missingok
|
||||
copytruncate
|
||||
|
||||
postrotate
|
||||
invoke-rc.d conntrackd restart > /dev/null
|
||||
endscript
|
||||
}
|
||||
|
@ -71,12 +71,9 @@ if $operatingsystem == 'Ubuntu' {
|
||||
}
|
||||
|
||||
# Workaround to ensure log is rotated properly
|
||||
file_line { 'logrotate-conntrackd':
|
||||
path => '/etc/logrotate.d/conntrackd',
|
||||
ensure => 'present',
|
||||
line => ' copytruncate',
|
||||
match => '^\s*copytruncate',
|
||||
after => 'missingok',
|
||||
require => Package[$conntrackd_package],
|
||||
file { '/etc/logrotate.d/conntrackd':
|
||||
content => template('openstack/95-conntrackd.conf.erb'),
|
||||
}
|
||||
|
||||
Package[$conntrackd_package] -> File['/etc/logrotate.d/conntrackd']
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user