From 36bdc18a8aa3bd6f3947b76c44509dc952a27027 Mon Sep 17 00:00:00 2001 From: zhaoxiangchun <1422928955@qq.com> Date: Thu, 1 Apr 2021 10:02:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(monitor):=E4=BF=AE=E5=A4=8D=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E6=80=BB=E8=A7=88=E5=9B=BE=E6=A0=87=E9=92=BB=E5=8F=96?= =?UTF-8?q?=E5=90=8E=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/monitor/alerting/conditions/query.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/monitor/alerting/conditions/query.go b/pkg/monitor/alerting/conditions/query.go index 8a6bfcda9f..7fd27cf828 100644 --- a/pkg/monitor/alerting/conditions/query.go +++ b/pkg/monitor/alerting/conditions/query.go @@ -663,6 +663,9 @@ func (c *QueryCondition) getFilterResources(start int, end int, continue } relationKey := relationMap[tag.Key] + if len(relationKey) == 0 { + continue + } filterObj := make([]jsonutils.JSONObject, 0) for _, res := range tmp { val, _ := res.GetString(relationKey)