mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
fix(cloudmon): cloudpods metric pull delay time (#25316)
This commit is contained in:
@@ -26,6 +26,8 @@ type CloudMonOptions struct {
|
||||
CollectMetricInterval int64 `help:"Increment Sync Interval unit:minute" default:"6"`
|
||||
SkipMetricPullProviders string `help:"Skip indicate provider metric pull" default:""`
|
||||
|
||||
CloudpodsCollectDelayMinutes int64 `help:"Cloudpods Collect Delay Duration unit:minute" default:"0"`
|
||||
|
||||
InfluxDatabase string `help:"influxdb database name, default telegraf" default:"telegraf"`
|
||||
|
||||
DisableServiceMetric bool `help:"disable service metric collect"`
|
||||
|
||||
@@ -18,6 +18,7 @@ import (
|
||||
"time"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/pkg/cloudmon/options"
|
||||
)
|
||||
|
||||
type CloudpodsCollect struct {
|
||||
@@ -37,5 +38,5 @@ func init() {
|
||||
}
|
||||
|
||||
func (self *CloudpodsCollect) GetDelayDuration() time.Duration {
|
||||
return time.Minute * 9
|
||||
return time.Minute * time.Duration(options.Options.CloudpodsCollectDelayMinutes)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user