AWS CloudWatch Graphed Metrics: Are Dynamic Labels with Dimensions Broken?

0

I have a graphed metric in a widget on a dashboard, where the metric is a query such as SELECT SUM("my.metric") FROM "namespace" WHERE mydimension = 'x' GROUP BY instance. This results in several graphed lines for each value of the instance dimension. If I try to put a dynamic label ${PROP('Dim.instance')} on the graph, the dynamic labels just gets displayed up as "instance:--" rather than the values of the dimension. It seems like a bug, but am I just doing this wrong? I want the labels on the lines to show the value of the dimension that they are plotting.

It's the exact same problem this person is having:

https://stackoverflow.com/questions/72910015/aws-cloudwatch-dinamic-lables-not-working-properly

已提问 2 年前1616 查看次数
2 回答
2
已接受的回答

Picking dimensions from metrics in Dynamic Labels is only supported for fully-specified metrics, not for metrics plotted from results of SEARCH or SELECT.

In your case though ${LABEL} (the default label for each metric) should be the instance (since that is the field you are grouping by). Try ${LABEL} instead

AWS
已回答 2 年前
profile pictureAWS
专家
Chris_G
已审核 2 年前
0

This does actually work with SEARCH expressions but not with queries. If you are having this problem, try switching to SEARCH expressions.

"If you use a dynamic label with a search expression, the dynamic label applies to every metric returned by the search." as stated here: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html

AWS
已回答 6 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则