From 1285bcb0664c04c7f7d192ebf5be4cea9032b363 Mon Sep 17 00:00:00 2001 From: zhaoxiangchun <1422928955@qq.com> Date: Mon, 23 Aug 2021 10:18:39 +0800 Subject: [PATCH] fix(monitor): update apiHelper field and log --- pkg/apihelper/interface.go | 2 +- pkg/apihelper/options.go | 2 +- pkg/monitor/tsdb/driver/influxdb/influxdb.go | 1 - pkg/monitor/worker/worker.go | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/apihelper/interface.go b/pkg/apihelper/interface.go index eb706510bd..f61eba47b0 100644 --- a/pkg/apihelper/interface.go +++ b/pkg/apihelper/interface.go @@ -64,7 +64,7 @@ func SyncModelSets(mssOld IModelSets, s *mcclient.ClientSession, opt *Options) ( IncludeDetails: opt.IncludeDetails, IncludeEmulated: includeEmulated, - InCludeOtherCloudEnv: opt.InCludeOtherCloudEnv, + InCludeOtherCloudEnv: opt.IncludeOtherCloudEnv, }) if err != nil { return diff --git a/pkg/apihelper/options.go b/pkg/apihelper/options.go index 2e7e9c62f8..3df66727cf 100644 --- a/pkg/apihelper/options.go +++ b/pkg/apihelper/options.go @@ -24,5 +24,5 @@ type Options struct { SyncInterval int ListBatchSize int IncludeDetails bool - InCludeOtherCloudEnv bool + IncludeOtherCloudEnv bool } diff --git a/pkg/monitor/tsdb/driver/influxdb/influxdb.go b/pkg/monitor/tsdb/driver/influxdb/influxdb.go index 438fbf68ca..22da7f5d29 100644 --- a/pkg/monitor/tsdb/driver/influxdb/influxdb.go +++ b/pkg/monitor/tsdb/driver/influxdb/influxdb.go @@ -94,7 +94,6 @@ func (e *InfluxdbExecutor) Query(ctx context.Context, dsInfo *tsdb.DataSource, t } dsInfo.Database = db - log.Errorf("rawQuery:%s", rawQuery) req, err := e.createRequest(dsInfo, rawQuery) if err != nil { return nil, err diff --git a/pkg/monitor/worker/worker.go b/pkg/monitor/worker/worker.go index 196182fa5b..96889c42fb 100644 --- a/pkg/monitor/worker/worker.go +++ b/pkg/monitor/worker/worker.go @@ -41,7 +41,7 @@ func NewWorker(opts *options.AlerterOptions) worker.IWorker { SyncInterval: opts.APISyncInterval, ListBatchSize: opts.APIListBatchSize, IncludeDetails: true, - InCludeOtherCloudEnv: true, + IncludeOtherCloudEnv: true, } apih, err := apihelper.NewAPIHelper(apiOpts, modelSets) if err != nil {