Fluentd: Set cinder-backup log path

Cinder-backup service does not provide the path of the log
so fluentd does not read it.

This patch makes fluentd to know where the log are for the cinder-backup service

Change-Id: I6aae8f2614fbca425595e56e565216c70b30b4d6
Closes-Bug: #1781019
This commit is contained in:
Juan Badia Payno 2018-07-10 20:01:16 +02:00
parent 77ca4b1c5a
commit 24dd97031f
2 changed files with 24 additions and 1 deletions

View File

@ -52,6 +52,11 @@ parameters:
CephClientUserName:
default: openstack
type: string
DockerCinderBackupLoggingSource:
type: json
default:
tag: openstack.cinder.backup
path: /var/log/containers/cinder/cinder-backup.log
resources:
@ -82,7 +87,14 @@ outputs:
config_settings: {get_attr: [CinderBase, role_data, config_settings]}
logging_source: {get_attr: [CinderBase, role_data, logging_source]}
logging_groups: {get_attr: [CinderBase, role_data, logging_groups]}
service_config_settings: {get_attr: [CinderBase, role_data, service_config_settings]}
service_config_settings:
map_merge:
- get_attr: [CinderBase, role_data, service_config_settings]
- fluentd:
tripleo_fluentd_groups_cinder_backup:
- cinder
tripleo_fluentd_sources_cinder_backup:
- {get_param: DockerCinderBackupLoggingSource}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: cinder

View File

@ -63,6 +63,11 @@ parameters:
MonitoringSubscriptionCinderBackup:
default: 'overcloud-cinder-backup'
type: string
CinderBackupLoggingSource:
type: json
default:
tag: openstack.cinder.backup
path: /var/log/cinder/cinder-backup.log
resources:
@ -96,6 +101,12 @@ outputs:
cinder::backup::swift::backup_swift_container: volumebackups
cinder::backup::nfs::backup_share: {get_param: CinderBackupNfsShare}
cinder::backup::nfs::backup_mount_options: {get_param: CinderBackupNfsMountOptions}
service_config_settings:
fluentd:
tripleo_fluentd_groups_cinder_backup:
- cinder
tripleo_fluentd_sources_cinder_backup:
- {get_param: CinderBackupLoggingSource}
step_config:
str_replace:
template: "include ::tripleo::profile::base::cinder::backup::DRIVER"