From 4c5f24542ac0365b8b3e25866f451272eb4c085c Mon Sep 17 00:00:00 2001 From: Krishna Chaitanya Reddy Burri Date: Mon, 2 Oct 2023 22:43:09 +0530 Subject: [PATCH] [filebeat][gcp-pubsub] - Set EventNormalization as false (#36716) * Update EventNormalization as false for GCP Pubsub --- CHANGELOG.next.asciidoc | 1 + x-pack/filebeat/input/gcppubsub/input.go | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 60c26d23609..d2c82dfbf64 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -220,6 +220,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] - Improve error logging in HTTPJSON input. {pull}36529[36529] - Disable warning message about ingest pipeline loading when running under Elastic Agent. {pull}36659[36659] - Add input metrics to http_endpoint input. {issue}36402[36402] {pull}36427[36427] +- Remove Event Normalization from GCP PubSub Input. {pull}36716[36716] - Update mito CEL extension library to v1.6.0. {pull}36651[36651] - Added support for new features & removed partial save mechanism in the Azure Blob Storage input. {issue}35126[35126] {pull}36690[36690] - Improve template evaluation logging for HTTPJSON input. {pull}36668[36668] diff --git a/x-pack/filebeat/input/gcppubsub/input.go b/x-pack/filebeat/input/gcppubsub/input.go index 6547333a5e0..c6d088b237b 100644 --- a/x-pack/filebeat/input/gcppubsub/input.go +++ b/x-pack/filebeat/input/gcppubsub/input.go @@ -154,6 +154,11 @@ func NewInput(cfg *conf.C, connector channel.Connector, inputContext input.Conte } }), ), + Processing: beat.ProcessingConfig{ + // This input only produces events with basic types so normalization + // is not required. + EventNormalization: boolPtr(false), + }, }) if err != nil { return nil, err @@ -322,3 +327,6 @@ func (in *pubsubInput) newPubsubClient(ctx context.Context) (*pubsub.Client, err return pubsub.NewClient(ctx, in.ProjectID, opts...) } + +// boolPtr returns a pointer to b. +func boolPtr(b bool) *bool { return &b }