From 24dd97031f9f74bb7aff0d7e3e77a1ec24b020da Mon Sep 17 00:00:00 2001 From: Juan Badia Payno Date: Tue, 10 Jul 2018 20:01:16 +0200 Subject: [PATCH] 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 --- docker/services/cinder-backup.yaml | 14 +++++++++++++- puppet/services/cinder-backup.yaml | 11 +++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docker/services/cinder-backup.yaml b/docker/services/cinder-backup.yaml index f9ca3adb31..c048548223 100644 --- a/docker/services/cinder-backup.yaml +++ b/docker/services/cinder-backup.yaml @@ -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 diff --git a/puppet/services/cinder-backup.yaml b/puppet/services/cinder-backup.yaml index 37a8185e23..99804d930f 100644 --- a/puppet/services/cinder-backup.yaml +++ b/puppet/services/cinder-backup.yaml @@ -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"