[metrics]: ECS average CpuUtilized reporting sum numbers instead of average
deggja opened this issue · 2 comments
Context information
- AWS service: ECS
- CloudWatch namespace: ECS/ContainerInsights
- Link to metrics documentation for this service: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-metrics.html
- AWS region of the exporter: Exporter not running in AWS
- AWS region of the service: eu-north-1
Exporter configuration
region: eu-north-1
role_arn: redacted
metrics:
# ECS
- aws_namespace: ECS/ContainerInsights
aws_metric_name: CpuUtilized
aws_dimensions: [ClusterName, ServiceName]
aws_statistics: [Average]
- aws_namespace: ECS/ContainerInsights
aws_metric_name: MemoryUtilized
aws_dimensions: [ClusterName, ServiceName]
aws_statistics: [Average]
Exporter logs
No logs when starting the exporter with this flag
What do you expect to happen?
I expect to see values between 0-100 as this metric is supposed to get the average value for cpu usage in percent.
What happened instead?
The exporter seems to be pulling the aws_statistic for [Sum] instead of [Average]. Even though the exporter is reporting using the Average statistic, the numbers I'm seeing match the Sum statistic in AWS console.
I have not used this exporter a whole lot, but it seems to work fine on other metrics. Any pointers in the right direction highly appreciated!
Thanks.
Interesting and odd! 😄 No idea what's going on here, if anyone knows, please do tell!
Hey @matthiasr,
I've updated my manifests using the latest version of the exporter and the numbers are adding up. As far as I can see, this bug is no longer present.
Thanks 🚀