mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
fix(cloudmon): oracle metric collect (#20052)
This commit is contained in:
@@ -34,8 +34,9 @@ type CloudMonOptions struct {
|
||||
HistoryMetricPullDays int `help:"pull history metrics" default:"-1"`
|
||||
SupportAzureTableStorageMetric bool `help:"support collect azure memory and disk usage metric, there may be additional charges" default:"false"`
|
||||
|
||||
CloudAccountCollectMetricsBatchCount int `help:"Cloud Account Collect Metrics Batch Count" default:"10"`
|
||||
CloudResourceCollectMetricsBatchCount int `help:"Cloud Resource Collect Metrics BatchC ount" default:"40"`
|
||||
CloudAccountCollectMetricsBatchCount int `help:"Cloud Account Collect Metrics Batch Count" default:"10"`
|
||||
CloudResourceCollectMetricsBatchCount int `help:"Cloud Resource Collect Metrics BatchC ount" default:"40"`
|
||||
OracleCloudResourceCollectMetricsBatchCount int `help:"OracleCloud Resource Collect Metrics BatchC ount" default:"1"`
|
||||
}
|
||||
|
||||
type PingProbeOptions struct {
|
||||
|
||||
@@ -196,7 +196,11 @@ func (self *SCollectByResourceIdDriver) CollectDBInstanceMetrics(ctx context.Con
|
||||
}
|
||||
|
||||
func (self *SCollectByResourceIdDriver) CollectServerMetrics(ctx context.Context, manager api.CloudproviderDetails, provider cloudprovider.ICloudProvider, res map[string]api.ServerDetails, start, end time.Time) error {
|
||||
ch := make(chan struct{}, options.Options.CloudResourceCollectMetricsBatchCount)
|
||||
cnt := options.Options.CloudResourceCollectMetricsBatchCount
|
||||
if manager.Provider == api.CLOUD_PROVIDER_ORACLE { // oracle 限速
|
||||
cnt = options.Options.OracleCloudResourceCollectMetricsBatchCount
|
||||
}
|
||||
ch := make(chan struct{}, cnt)
|
||||
defer close(ch)
|
||||
metrics := []influxdb.SMetricData{}
|
||||
var wg sync.WaitGroup
|
||||
|
||||
Reference in New Issue
Block a user