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

asked a year ago1592 views
2 Answers
2
Accepted Answer

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
answered a year ago
profile pictureAWS
EXPERT
Chris_G
reviewed a year ago
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
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions