fixed deployment-pods metrics

This commit is contained in:
Carman Zhang
2018-11-14 16:04:24 +08:00
parent fbf053306b
commit beb7efdac0
4 changed files with 155 additions and 86 deletions

View File

@@ -230,8 +230,8 @@ func ReformatJson(metric string, metricsName string, needDelParams ...string) *F
result := formatMetric.Data.Result
for _, res := range result {
metric, exist := res[ResultItemMetric]
metricMap := metric.(map[string]interface{})
if exist {
metricMap, sure := metric.(map[string]interface{})
if exist && sure {
delete(metricMap, "__name__")
}
if len(needDelParams) > 0 {