0

At first I was sending my metric like this:

aws cloudwatch put-metric-data --metric-name testMetricName --namespace test --unit Bytes --value $(( val += RANDOM % 1001 - 500)) --dimensions Server=AAA,Region=BBB

I stopped that and changed the unit:

aws cloudwatch put-metric-data --metric-name testMetricName --namespace test --unit Gigabytes --value $(( val += RANDOM % 1001 - 500)) --dimensions Server=AAA,Region=BBB

The metric still appears on the same graph, nothing seems to have changed. I thought cloudwatch aggregates metrics by the unit and this was supposed to create a new metric:

Metric data points that specify a unit of measure are aggregated separately. When you get statistics without specifying a unit, CloudWatch aggregates all data points of the same unit together. If you have two otherwise identical metrics with different units, two separate data streams are returned, one for each unit.

red888
  • 27,709
  • 55
  • 204
  • 392
  • Possible duplicate of [Can I change metric units on CloudWatch?](https://stackoverflow.com/questions/46711700/can-i-change-metric-units-on-cloudwatch) – Dejan Peretin Jan 29 '18 at 16:17

1 Answers1

1

Console currently doesn't support filtering metrics by Unit. However, if you view them using the get-metric-statistics, without specifying the units, you would be able to observe the metrics with their respective units. In the console, metrics would get aggregated based on their units, but you won't be able to filter by the unit.

Tushar
  • 78
  • 5