mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(cloudmon): fix gcp metric pull
1. external_id format
This commit is contained in:
@@ -42,7 +42,9 @@ func (self *SGoogleCloudReport) collectRegionMetricOfHost(region cloudprovider.I
|
||||
continue
|
||||
}
|
||||
serverName, _ := server.GetString("name")
|
||||
external_id = strings.Split(external_id, "/")[1]
|
||||
if strings.Contains(external_id, "/") {
|
||||
external_id = strings.Split(external_id, "/")[1]
|
||||
}
|
||||
for metricName, influxDbSpecs := range gcpMetricSpecs {
|
||||
rtn, err := googleReg.GetMonitorData(external_id, serverName, metricName, since, until)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user