From ca871c859858e60d107c5cfdd48d21b285c5b23c Mon Sep 17 00:00:00 2001 From: Jameel Al-Aziz <247849+jalaziz@users.noreply.github.com> Date: Tue, 3 Mar 2020 10:51:51 -0800 Subject: [PATCH 1/2] Fix renaming cloud metadata processor fields (#13808) Clone the underlying metadata to allow renaming sub-fields under cloud that are injected by the cloud metadata processor. (cherry picked from commit 6785901e609ee6e898b5a51b681b2746d480a61c) --- CHANGELOG.next.asciidoc | 3 +++ libbeat/processors/add_cloud_metadata/add_cloud_metadata.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index b493a4501b0..710f329d68a 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -68,6 +68,9 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Update replicaset group to apps/v1 {pull}15854[15802] - Fix `metricbeat test output` with an ipv6 ES host in the output.hosts. {pull}15368[15368] - Fix `convert` processor conversion of string to integer with leading zeros. {issue}15513[15513] {pull}15557[15557] +- Fix `add_cloud_metadata` to better support modifying sub-fields with other processors. {pull}13808[13808] +- TLS or Beats that accept connections over TLS and validate client certificates. {pull}14146[14146] +- Fix panics that could result from invalid TLS certificates. This can affect Beats that connect over TLS, or Beats that accept connections over TLS and validate client certificates. {pull}14146[14146] - Fix panic in the Logstash output when trying to send events to closed connection. {pull}15568[15568] - Fix missing output in dockerlogbeat {pull}15719[15719] - Fix logging target settings being ignored when Beats are started via systemd or docker. {issue}12024[12024] {pull}15422[15442] diff --git a/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go b/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go index c49f37ad398..de1a8063667 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) { From e7f99df315be0a2bdd4d858dd61da7d48857bd6b Mon Sep 17 00:00:00 2001 From: kaiyan-sheng Date: Tue, 3 Mar 2020 12:07:50 -0700 Subject: [PATCH 2/2] update changelog --- CHANGELOG.next.asciidoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 710f329d68a..96a1f395d71 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -69,8 +69,6 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fix `metricbeat test output` with an ipv6 ES host in the output.hosts. {pull}15368[15368] - Fix `convert` processor conversion of string to integer with leading zeros. {issue}15513[15513] {pull}15557[15557] - Fix `add_cloud_metadata` to better support modifying sub-fields with other processors. {pull}13808[13808] -- TLS or Beats that accept connections over TLS and validate client certificates. {pull}14146[14146] -- Fix panics that could result from invalid TLS certificates. This can affect Beats that connect over TLS, or Beats that accept connections over TLS and validate client certificates. {pull}14146[14146] - Fix panic in the Logstash output when trying to send events to closed connection. {pull}15568[15568] - Fix missing output in dockerlogbeat {pull}15719[15719] - Fix logging target settings being ignored when Beats are started via systemd or docker. {issue}12024[12024] {pull}15422[15442]