From ae295d88b784ebf92ca2fc963b8293560a21339d Mon Sep 17 00:00:00 2001 From: Hardy Date: Sat, 25 Jan 2025 17:13:23 +0800 Subject: [PATCH] fix: must use term with rollup (#108) Co-authored-by: hardy --- config/setup/common/alerting.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/setup/common/alerting.tpl b/config/setup/common/alerting.tpl index 2a06718e..6a1248df 100644 --- a/config/setup/common/alerting.tpl +++ b/config/setup/common/alerting.tpl @@ -242,7 +242,7 @@ POST $[[SETUP_INDEX_PREFIX]]alert-rule/$[[SETUP_DOC_TYPE]]/builtin-cal8n7p7h710d "bool": { "must": [ { - "match": { + "term": { "payload.elasticsearch.cluster_health.status": "red" } }, @@ -400,7 +400,7 @@ POST $[[SETUP_INDEX_PREFIX]]alert-rule/$[[SETUP_DOC_TYPE]]/builtin-calavvp7h710d ".infini_metrics" ], "filter": {}, - "raw_filter": {"bool":{"must":[{"match":{"payload.elasticsearch.index_health.status":"red"}},{"term":{"metadata.name":{"value":"index_health"}}}]}}, + "raw_filter": {"bool":{"must":[{"term":{"payload.elasticsearch.index_health.status":"red"}},{"term":{"metadata.name":{"value":"index_health"}}}]}}, "time_field": "timestamp", "context": { "fields": null