fuel-library/deployment/puppet/rsyslog/manifests/client.pp
Bogdan Dobrelya a3ec3ce2b8 Sync logging from upstream puppet modules for OS
* Sync log_dir/log_file/use_syslog usage from upstream in order to
  use the same logging guidelines for all OS modules in Fuel as well
* Add new use_syslog_rfc_format option in addition to use_syslog in
  order to ensure RFC5424 comliant logging to syslog for all OS services
* Add section for handling the deprecated things in OS logging class
* Fix remote logs matching for multiline messages
  (Use octet-framing at sender side)
* Simplify matching logic (&~) for remote logs processing
* Remove artificial separation for DEBUG and other OS logging cases
* Remove unneeded anymore imfile::templates
* Remove unneeded anymore python log configs templates for OS and
  syslog_log_level option used for its log configs as well
* Remove artificial logging w/a for Neutron and its imfile templates
* Fix ceilometer facility to LOCAL0 and its facility parameter usage
* Move Fuel customizations from rsyslog module to openstack
  * Move custom logging templates and configuration
  * Move checksum_udp and use rsyslog port as a class var
  * Keep custom port and escapenewline vars for rsyslog module,
  * Disable RELP package for syslog module unless it would be used in Fuel
* Fix identations...

Implemenets step2 for blueprint refactor-logging-puppet-openstack-services

Change-Id: Ie20725b9c91584311350a520107a79a4828937bc
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2014-06-06 10:24:53 +03:00

40 lines
805 B
Puppet

#
#
#
class rsyslog::client (
$log_remote = true,
$remote_type = 'tcp',
$log_local = false,
$log_auth_local = false,
$custom_config = undef,
$server = 'log',
$escapenewline = false,
) inherits rsyslog {
$content_real = $custom_config ? {
'' => template("${module_name}/01-client.conf.erb"),
default => template($custom_config),
}
File {
owner => root,
group => $rsyslog::params::run_group,
mode => 0640,
notify => Class["rsyslog::service"],
}
file { $rsyslog::params::rsyslog_d:
purge => true,
recurse => true,
force => true,
ensure => directory,
}
file { $rsyslog::params::client_conf:
ensure => present,
content => $content_real,
require => File[$rsyslog::params::rsyslog_d],
}
}