mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(cloudmon): fix Apsara elb metric
This commit is contained in:
@@ -279,6 +279,7 @@ func (self *SApsaraCloudReport) collectRegionMetricOfElb(region cloudprovider.IC
|
||||
}
|
||||
}
|
||||
}
|
||||
log.Infof("SendMetrics %s length: %d", metricName, len(dataList))
|
||||
}
|
||||
return common.SendMetrics(self.Session, dataList, self.Args.Debug, "")
|
||||
}
|
||||
|
||||
@@ -177,7 +177,9 @@ var aliOSSMetricSpecs = map[string][]string{
|
||||
}
|
||||
var aliElbMetricSpecs = map[string][]string{
|
||||
"InstanceTrafficRX": {DEFAULT_STATISTICS, UNIT_BPS, INFLUXDB_FIELD_ELB_NET_BPS_RX},
|
||||
"TrafficRXNew": {DEFAULT_STATISTICS, UNIT_BPS, INFLUXDB_FIELD_ELB_NET_BPS_RX},
|
||||
"InstanceTrafficTX": {DEFAULT_STATISTICS, UNIT_BPS, INFLUXDB_FIELD_ELB_NET_BPS_TX},
|
||||
"TrafficTXNew": {DEFAULT_STATISTICS, UNIT_BPS, INFLUXDB_FIELD_ELB_NET_BPS_TX},
|
||||
"InstanceStatusCode2xx": {DEFAULT_STATISTICS, UNIT_COUNT_SEC, INFLUXDB_FIELD_ELB_HRSP_COUNT_2XX},
|
||||
"InstanceStatusCode3xx": {DEFAULT_STATISTICS, UNIT_COUNT_SEC, INFLUXDB_FIELD_ELB_HRSP_COUNT_3XX},
|
||||
"InstanceStatusCode4xx": {DEFAULT_STATISTICS, UNIT_COUNT_SEC, INFLUXDB_FIELD_ELB_HRSP_COUNT_4XX},
|
||||
|
||||
@@ -61,7 +61,12 @@ func (self *CloudReportBase) GetResourceByOperator() ([]jsonutils.JSONObject, er
|
||||
case OSS:
|
||||
servers, err = self.GetAllserverOfThisProvider(&modules.Buckets, nil)
|
||||
case ELB:
|
||||
servers, err = self.GetAllserverOfThisProvider(&modules.Loadbalancers, nil)
|
||||
query := jsonutils.NewDict()
|
||||
query.Add(jsonutils.NewString("0"), KEY_LIMIT)
|
||||
query.Add(jsonutils.NewString("true"), KEY_ADMIN)
|
||||
query.Add(jsonutils.NewString(self.SProvider.Provider), "provider")
|
||||
query.Add(jsonutils.NewString(self.SProvider.Id), "manager")
|
||||
servers, err = self.GetAllserverOfThisProvider(&modules.Loadbalancers, query)
|
||||
case K8S:
|
||||
query := jsonutils.NewDict()
|
||||
query.Add(jsonutils.NewString("0"), KEY_LIMIT)
|
||||
|
||||
Reference in New Issue
Block a user