Use rsyslog::imfile for rabbitmq

Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
This commit is contained in:
Bogdan Dobrelya 2013-07-15 17:37:29 +03:00
parent 00e43913d9
commit 4cc1058bfe
4 changed files with 18 additions and 16 deletions

View File

@ -55,13 +55,6 @@ if $role == 'client' {
syslog_log_facility_nova => $syslog_log_facility_nova,
syslog_log_facility_keystone => $syslog_log_facility_keystone,
}
# FIXME Find more appropriate way to ensure rsyslog service would be restarted
# while custom runstage openstack::logging class has been called within
# exec {'rsyslog_forcerestart':
# path => ["/usr/bin", "/usr/sbin", "/sbin", "/bin"],
# command => "service ${::rsyslog::params::service_name} restart",
# returns => 0,
# }
} else { # server
firewall { "$port $proto rsyslog":
@ -82,13 +75,6 @@ if $role == 'client' {
high_precision_timestamps => $show_timezone,
virtual => $virtual,
}
# FIXME Find more appropriate way to ensure rsyslog service would be restarted
# while custom runstage openstack::logging class has been called within
# exec {'rsyslog_forcerestart':
# path => ["/usr/bin", "/usr/sbin", "/sbin", "/bin"],
# command => "service ${::rsyslog::params::service_name} restart",
# returns => 0,
# }
}
class {"::openstack::logrotate":

View File

@ -43,6 +43,21 @@ if $virtual { include rsyslog::checksum_udp514 }
notify => Class["rsyslog::service"],
}
# Rabbitmq does not support syslogging, use imfile
::rsyslog::imfile { "04-rabbitmq" :
file_name => "/var/log/rabbitmq/rabbit@${hostname}.log",
file_tag => "rabbitmq",
file_facility => "syslog",
notify => Class["rsyslog::service"],
}
::rsyslog::imfile { "04-rabbitmq-sasl" :
file_name => "/var/log/rabbitmq/rabbit@${hostname}-sasl.log",
file_tag => "rabbitmq-sasl",
file_facility => "syslog",
notify => Class["rsyslog::service"],
}
file { "${rsyslog::params::rsyslog_d}02-ha.conf":
ensure => present,
content => template("${module_name}/02-ha.conf.erb"),

View File

@ -1,3 +1,4 @@
#
define rsyslog::imfile(
$file_name,
$file_tag,
@ -13,7 +14,7 @@ define rsyslog::imfile(
owner => 'root',
group => $rsyslog::params::run_group,
content => template('rsyslog/imfile.erb'),
require => Class['rsyslog::install'],
#require => Class['rsyslog::install'],
notify => Class['rsyslog::service'],
}
}

View File

@ -7,7 +7,7 @@ $InputFileTag <%= file_tag %>
$InputFileStateFile state-<%= name %>
$InputFileSeverity <%= file_severity %>
$InputFileFacility <%= file_facility %>
$InputFilePollingInterval <%= polling_interval %>
$InputFilePollInterval <%= polling_interval %>
<% if run_file_monitor == true -%>
$InputRunFileMonitor
<% end -%>