Cloudwatch Custom Metric

I am using cloudwatch as a data source for my grafana dashboard.

I use the following two commands to send data to cloudwatch:

aws cloudwatch put-metric-data --namespace Staging --dimensions Component=app1 --dimensions Name=api_perf --dimensions APIVerb=GET --metric-name /api1 --value 21
aws cloudwatch put-metric-data --namespace Staging --dimensions Component=app1 --dimensions Name=api_perf --dimensions APIVerb=GET --metric-name /api2 --value 13

I am trying to monitor the api performances for the two apis GET /api1 and GET /api2.


My question is: Is there a way to display all the apis using a single configuration for the metric? i.e. I should be able to use a *, instead of multiple metrics for api1, api2 and so on.

Hi,

At the moment there’s no way other than having a query per metric.

However, I would suggest you to change how you write your metrics and use a general metric name, like request count, and add the /api1 and /api2 as dimensions. In my head you would then be able to write only one query where you select the metric name “request count” or similar.

Please let me know if this works out for you

Marcus

OH snap! Want this so bad. So anyoing to have to specify every point. Would like to have a *
Seems that cloudwatch API doesen’t support this.