From 36a616d5757d20eafefa5d904978051e5ee978ce Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Tue, 19 Nov 2024 14:00:15 +0800 Subject: [PATCH] fix(monitor): inject ResType (#21625) --- pkg/monitor/alerting/conditions/query.go | 4 +++- pkg/monitor/tsdb/driver/influxdb/influxdb.go | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/monitor/alerting/conditions/query.go b/pkg/monitor/alerting/conditions/query.go index fad4056186..df4517e08f 100644 --- a/pkg/monitor/alerting/conditions/query.go +++ b/pkg/monitor/alerting/conditions/query.go @@ -561,7 +561,9 @@ func (c *QueryCondition) setResType() { } } */ if c.Query.Model.Database == monitor.METRIC_DATABASE_TELE { - c.ResType = resType + if c.ResType == "" { + c.ResType = resType + } } } diff --git a/pkg/monitor/tsdb/driver/influxdb/influxdb.go b/pkg/monitor/tsdb/driver/influxdb/influxdb.go index 2db8b98965..b5dfcddeea 100644 --- a/pkg/monitor/tsdb/driver/influxdb/influxdb.go +++ b/pkg/monitor/tsdb/driver/influxdb/influxdb.go @@ -97,7 +97,6 @@ func (e *InfluxdbExecutor) Query(ctx context.Context, dsInfo *tsdb.DataSource, t return nil, errors.Wrap(err, "GetRawQuery") } - log.Debugf("sql: %s", rawQuery) db := dsInfo.Database if db == "" { db = tsdbQuery.Queries[0].Database