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

gefragt vor 2 Jahren1616 Aufrufe
2 Antworten
2
Akzeptierte Antwort

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
beantwortet vor 2 Jahren
profile pictureAWS
EXPERTE
Chris_G
überprüft vor 2 Jahren
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
beantwortet vor 6 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen