From 00153fd70fbc927f9f8eb5920a0590c8e5116f18 Mon Sep 17 00:00:00 2001 From: Bena Kansara <69037875+benakansara@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:39:37 +0200 Subject: [PATCH] [Inventory/Metric/Custom threshold] Specify fields instead of '*' in fieldCaps request (#184968) Resolves https://github.com/elastic/kibana/issues/184909 --- .../infra/server/lib/alerting/common/utils.ts | 2 +- .../observability/server/lib/rules/custom_threshold/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/common/utils.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/common/utils.ts index e91f80dccbac9..9c506d215355a 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/common/utils.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/common/utils.ts @@ -196,7 +196,7 @@ export const doFieldsExist = async ( // Get all supported fields const respMapping = await esClient.fieldCaps({ index, - fields: '*', + fields, }); const fieldsExisted: Record = {}; diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/utils.ts b/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/utils.ts index 2a7a69f591e8c..88f1febca71c0 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/utils.ts +++ b/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/utils.ts @@ -130,7 +130,7 @@ export const doFieldsExist = async ( // Get all supported fields const respMapping = await esClient.fieldCaps({ index, - fields: '*', + fields, }); const fieldsExisted: Record = {};