Browse Source

CloudWatch: Use default alias if there is no alias for metrics (#16732)

Fixes #16605
Utkarsh Bhatnagar 6 years ago
parent
commit
89a01a680c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      pkg/tsdb/cloudwatch/cloudwatch.go

+ 4 - 0
pkg/tsdb/cloudwatch/cloudwatch.go

@@ -228,5 +228,9 @@ func formatAlias(query *CloudWatchQuery, stat string, dimensions map[string]stri
 		return in
 	})
 
+	if string(result) == "" {
+		return metricName + "_" + stat
+	}
+
 	return string(result)
 }