From 10a8f25deb60c0a3af9a7a0179733b616abc102d Mon Sep 17 00:00:00 2001 From: Jameel Al-Aziz Date: Thu, 26 Sep 2019 00:41:07 -0700 Subject: [PATCH] Fix renaming cloud metadata processor fields Clone the underlying metadata to allow renaming sub-fields under cloud that are injected by the cloud metadata processor. --- CHANGELOG.next.asciidoc | 1 + libbeat/processors/add_cloud_metadata/add_cloud_metadata.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 8f18c17b77f0..2222e235a004 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -123,6 +123,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d TLS or Beats that accept connections over TLS and validate client certificates. {pull}14146[14146] - Support usage of custom builders without hints and mappers {pull}13839[13839] - Fix kubernetes `metaGenerator.ResourceMetadata` when parent reference controller is nil {issue}14320[14320] {pull}14329[14329] +- Fix `add_cloud_metadata` to better support modifying sub-fields with other processors. {pull}13808[13808] *Auditbeat* diff --git a/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go b/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go index d4a8ea22baee..8d44ae260c75 100644 --- a/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go +++ b/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go @@ -97,7 +97,7 @@ func (p *addCloudMetadata) init() { func (p *addCloudMetadata) getMeta() common.MapStr { p.init() - return p.metadata + return p.metadata.Clone() } func (p *addCloudMetadata) Run(event *beat.Event) (*beat.Event, error) {