Merge "Fix rsyslog deprecated and duplicate settings"
This commit is contained in:
commit
ce10e0e6f2
|
@ -4,4 +4,4 @@ $AddUnixListenSocket /var/lib/haproxy/dev/log
|
|||
|
||||
# Send HAProxy messages to a dedicated logfile
|
||||
if $programname startswith 'haproxy' then <%= @log_file %>
|
||||
&~
|
||||
& stop
|
||||
|
|
|
@ -88,6 +88,15 @@
|
|||
# (optional)
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*rabbit_fqdn_prefix*]
|
||||
# (optional)
|
||||
# Defaults to ''.
|
||||
#
|
||||
# [*ironic_collector*]
|
||||
# (optional)
|
||||
# Defaults to false.
|
||||
#
|
||||
|
||||
class openstack::logging (
|
||||
$role = 'client',
|
||||
$log_remote = true,
|
||||
|
@ -119,11 +128,21 @@ class openstack::logging (
|
|||
class { '::openstack::checksum_udp' : port => $port }
|
||||
}
|
||||
|
||||
include ::rsyslog::params
|
||||
|
||||
# Configure syslog roles
|
||||
if $role == 'client' {
|
||||
|
||||
# configure service to load 'imfile' module once in the global config,
|
||||
# next in the extra_modules as a workaround to not load in the snippets
|
||||
class { '::rsyslog':
|
||||
modules => [
|
||||
'$ModLoad imuxsock # provides support for local system logging',
|
||||
'$ModLoad imklog # provides kernel logging support (previously done by rklogd)',
|
||||
'#$ModLoad immark # provides --MARK-- message capability',
|
||||
'$ModLoad imfile # provides the ability to convert any standard text file into a syslog message',
|
||||
],
|
||||
extra_modules => [ 'imfile' ],
|
||||
}
|
||||
|
||||
if $rservers == undef {
|
||||
fail('Please provide a valid $rservers configuration')
|
||||
} else {
|
||||
|
|
|
@ -37,6 +37,15 @@ describe 'openstack::logging' do
|
|||
it 'configures with the default params' do
|
||||
should_not contain_class('openstack::checksum_udp')
|
||||
should contain_class('rsyslog::params')
|
||||
should contain_class('rsyslog').with(
|
||||
:modules => [
|
||||
'$ModLoad imuxsock # provides support for local system logging',
|
||||
'$ModLoad imklog # provides kernel logging support (previously done by rklogd)',
|
||||
'#$ModLoad immark # provides --MARK-- message capability',
|
||||
'$ModLoad imfile # provides the ability to convert any standard text file into a syslog message',
|
||||
],
|
||||
:extra_modules => [ 'imfile' ],
|
||||
)
|
||||
should contain_rsyslog__imfile('04-rabbitmq')
|
||||
should contain_rsyslog__imfile('04-rabbitmq-sasl')
|
||||
should contain_rsyslog__imfile('04-rabbitmq-startup_err')
|
||||
|
|
|
@ -32,7 +32,7 @@ $ActionResumeRetryCount -1
|
|||
# Isolate sudo logs locally
|
||||
# match if "program name" is equal to "sudo"
|
||||
:programname, isequal, "sudo" -/var/log/sudo.log
|
||||
&~
|
||||
& stop
|
||||
|
||||
<% if rserver['remote_type'] == 'tcp' -%>
|
||||
# Send messages we receive to master node via tcp
|
||||
|
|
|
@ -12,4 +12,4 @@ if ($programname == 'lrmd' \
|
|||
or $programname == 'corosync') \
|
||||
then -/var/log/pacemaker.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# managed by puppet
|
||||
|
||||
LOCAL1.* -/var/log/dashboard.log
|
||||
LOCAL1.* ~
|
||||
LOCAL1.* stop
|
||||
|
|
|
@ -8,5 +8,5 @@ if ($programname == 'mysql' \
|
|||
or $programname == 'mysql-wss') \
|
||||
then -/var/log/mysql/mysqld.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "nova" /var/log/nova-all.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "keystone" /var/log/keystone-all.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "cinder" /var/log/cinder-all.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -21,12 +21,12 @@ $template PuppetApplyLogFile, "/var/log/remote/%fromhost-ip%/puppet-apply.log"
|
|||
|
||||
# Parse puppet logs
|
||||
:syslogtag, regex, "puppet-user" ?PuppetApplyLogFile;RemoteLog
|
||||
&~
|
||||
& stop
|
||||
:syslogtag, regex, "puppet-error" ?PuppetApplyLogFile;RemoteLog
|
||||
&~
|
||||
& stop
|
||||
|
||||
:fromhost-ip, regex, "^[1-9]" ?RemoteLogFile;RemoteLog
|
||||
&~
|
||||
& stop
|
||||
|
||||
<% end -%>
|
||||
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "glance" /var/log/glance-all.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "neutron" /var/log/neutron-all.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "ceilometer" /var/log/ceilometer-all.log
|
||||
### stop further processing for the matched entries
|
||||
&~
|
||||
& stop
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "sahara" /var/log/sahara-all.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "aodh" /var/log/aodh-all.log
|
||||
### stop further processing for the matched entries
|
||||
&~
|
||||
& stop
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "heat" /var/log/heat-all.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "murano" /var/log/murano-all.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -6,4 +6,4 @@ if ($programname == 'puppet-apply' \
|
|||
or $programname == 'puppet-error') \
|
||||
then -/var/log/puppet/puppet.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
### drop duplicating mcollective/nailgun-agent messages
|
||||
if ($programname == 'mcollective' or \
|
||||
$programname == 'nailgun-agent' ) \
|
||||
then ~
|
||||
then stop
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
:syslogtag, contains, "mongod" -/var/log/mongod.log
|
||||
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
:syslogtag, contains, "swift" /var/log/swift-all.log
|
||||
### stop further processing for the matched entries
|
||||
& ~
|
||||
& stop
|
||||
|
|
Loading…
Reference in New Issue