Cloudwatch plugin - using wildcard with metric name does not work

Hi, I encountered the following case.

I have metrics in Cloudwatch for around 200 devices, that use the following pattern:

  • device.dev.cpu.827192
  • device.dev.cpu.742124
  • device.dev.cpu.494271
  • device.dev.cpu.321692

What I want to do in my dashboard is to have one query, that looks like this: “device.dev.cpu*”
that will retrieve all metrics which follow the specified pattern.

Sample screenshot:

Wildcards work perfectly fine in the AWS Cloudwatch console, but when I try to do the same in Grafana, I don’t receive any data. Also the query inspector does not display anything, so I cannot debug it or see if there is an error with the query itself.

If you guys have idea if this is even supported in the Cloudwatch plugin for Grafana, I would be happy to know.

3 Likes

Hi. I’m also need this feature. Maybe someone know a workaround?

I also need this feature. Any workaround known?

I’m also looking to solve this problem. I thought maybe it could be done by using variables but then when using variables you can not set up alerts. (https://github.com/grafana/grafana/issues/6557)
However, if you don’t need alerts, variables might be a good solution for you.

Hi jbulow,

Could you please provide a sample about how to use variables for this?

Not really but have a look at this and I think you shall manage: https://grafana.com/docs/reference/templating/#adding-a-variable

1 Like

Hi @chh
Sample variable:
$redis = dimension_values(us-east-1,AWS/ElastiCache,CPUUtilization, CacheClusterId)

docs: https://grafana.com/docs/features/datasources/cloudwatch/

Please add this feature