From 63a147a3709c19d815565f4934592812010663ed Mon Sep 17 00:00:00 2001 From: Gabriel Pop <94497545+gpop63@users.noreply.github.com> Date: Mon, 28 Aug 2023 19:20:16 +0300 Subject: [PATCH] [Metricbeat] [GCP] Fix compute metadata (#36338) * don't remake map * only add instances from project_id * fix ecs cloud region and AZ bug * Revert "fix ecs cloud region and AZ bug" This reverts commit 349bf6bef1fc4e9d18bca17dc8e7396f08fd842b. * Revert "only add instances from project_id" This reverts commit 89f6ab5f45e429d64b5c13aa1b0f224a9f2e4acb. * add changelog entry --- CHANGELOG.next.asciidoc | 1 + x-pack/metricbeat/module/gcp/metrics/compute/metadata.go | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 42592dd63ed..b0c2e143b9b 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -125,6 +125,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] - Resolve statsd module's prematurely halting of metrics parsing upon encountering an invalid packet. {pull}35075[35075] - Fix the gap in fetching forecast API metrics at the end of each month for Azure billing module {pull}36142[36142] - Add option in SQL module to execute queries for all dbs. {pull}35688[35688] +- Fix GCP compute metadata. {pull}36338[36338] - Add support for api_key authentication in elasticsearch module {pull}36274[36274] - Add remaining dimensions for azure storage account to make them available for tsdb enablement. {pull}36331[36331] - Add missing 'TransactionType' dimension for Azure Storage Account. {pull}36413[36413] diff --git a/x-pack/metricbeat/module/gcp/metrics/compute/metadata.go b/x-pack/metricbeat/module/gcp/metrics/compute/metadata.go index 1db96f1d594..c215e471b45 100644 --- a/x-pack/metricbeat/module/gcp/metrics/compute/metadata.go +++ b/x-pack/metricbeat/module/gcp/metrics/compute/metadata.go @@ -154,9 +154,6 @@ func (s *metadataCollector) instance(ctx context.Context, instanceID string) (*c return computeInstance, nil } - // Remake the compute instances map to avoid having stale data. - s.computeInstances = make(map[uint64]*computepb.Instance) - return nil, nil }