From bfaf980205b4d7f9c3e688ac08e86a79d66775fd Mon Sep 17 00:00:00 2001 From: Zacqary Xeper Date: Mon, 27 Apr 2020 15:14:06 -0500 Subject: [PATCH] [Metrics UI] Fix alerting when a filter query is present --- .../lib/alerting/metric_threshold/metric_threshold_executor.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts index 946f1c14bf593..85dea52db89e8 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts @@ -159,8 +159,7 @@ export const getElasticsearchMetricQuery = ( return { query: { bool: { - filter: [...rangeFilters, ...metricFieldFilters], - ...parsedFilterQuery, + filter: [...rangeFilters, ...metricFieldFilters, parsedFilterQuery], }, }, size: 0,