diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index cb5d4ceffaab..dc73dc05a950 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -29,6 +29,8 @@ https://github.com/elastic/beats/compare/v6.3.2...6.3[Check the HEAD diff] *Affecting all Beats* +- Fix a race condition with the `add_host_metadata` and the event serialization. {pull}8223[8223] + *Auditbeat* *Filebeat* diff --git a/libbeat/processors/add_host_metadata/add_host_metadata.go b/libbeat/processors/add_host_metadata/add_host_metadata.go index 65d8dbb65446..44018f9e448e 100644 --- a/libbeat/processors/add_host_metadata/add_host_metadata.go +++ b/libbeat/processors/add_host_metadata/add_host_metadata.go @@ -38,7 +38,7 @@ func newHostMetadataProcessor(_ *common.Config) (processors.Processor, error) { // Run enriches the given event with the host meta data func (p *addHostMetadata) Run(event *beat.Event) (*beat.Event, error) { p.loadData() - event.Fields.DeepUpdate(p.data) + event.Fields.DeepUpdate(p.data.Clone()) return event, nil }