From 274b97ef2b1de563d610037c353c02fdd990135b Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Wed, 15 Mar 2023 20:25:29 +0800 Subject: [PATCH] fix(monitor): set wrong resType when query --- pkg/monitor/alerting/conditions/query.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/monitor/alerting/conditions/query.go b/pkg/monitor/alerting/conditions/query.go index bdd3aa1b89..40539b2c19 100644 --- a/pkg/monitor/alerting/conditions/query.go +++ b/pkg/monitor/alerting/conditions/query.go @@ -529,7 +529,8 @@ func (c *QueryCondition) setResType() { resType = metricMeasurement.ResType c.ResType = resType } - if len(resType) != 0 && c.Query.Model.GroupBy[0].Params[0] != monitor. + // NOTE: shouldn't set ResType when tenant_id and domain_id within GroupBy + /* if len(resType) != 0 && c.Query.Model.GroupBy[0].Params[0] != monitor. MEASUREMENT_TAG_ID[resType] { for _, groupBy := range c.Query.Model.GroupBy { tag := groupBy.Params[0] @@ -542,7 +543,7 @@ func (c *QueryCondition) setResType() { break } } - } + } */ if c.Query.Model.Database == monitor.METRIC_DATABASE_TELE { c.ResType = resType }