From 89a01a680c5772a363dd624c0e4e49ebf397f862 Mon Sep 17 00:00:00 2001 From: Utkarsh Bhatnagar Date: Wed, 24 Apr 2019 01:00:02 -0700 Subject: [PATCH] CloudWatch: Use default alias if there is no alias for metrics (#16732) Fixes #16605 --- pkg/tsdb/cloudwatch/cloudwatch.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/tsdb/cloudwatch/cloudwatch.go b/pkg/tsdb/cloudwatch/cloudwatch.go index ab9c5ce8335..56e9bd30e98 100644 --- a/pkg/tsdb/cloudwatch/cloudwatch.go +++ b/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) }