- Newest
- Most votes
- Most comments
This worked for me.
Note that host might not be the aggregation_dimensions you want. It might be InstanceId.
This is a setup for an autoscaling group using Amazon Linux 2023.
{ "agent": { ... }, "metrics": { "aggregation_dimensions": [["host"]], "metrics_collected": { "disk": { "measurement": ["used_percent"], "resources": ["*"], "drop_original_metrics": ["used_percent"], "drop_device": true } } } }
To aggregate the disk metrics into a single metric representing the total disk usage percentage across all disks, you need to modify the "disk" section in your CloudWatch Agent configuration file. Here's how you can change the configuration to achieve this:
- Remove the "aggregation_dimensions" line from the "disk" section.
- Add "drop_device": true to the "disk" section.
Your modified "disk" section should look like this:
"disk": { "measurement": [ "used_percent" ], "resources": [ "*" ], "drop_original_metrics": true, "drop_device": true }
The "drop_device" option tells the CloudWatch agent to remove the device dimension from the metric, effectively aggregating the disk usage across all devices into a single metric.
This change will result in a single disk metric that represents the overall disk usage percentage across all disks, similar to how your CPU and memory metrics are reported. The metric will be reported without any device-specific dimensions, giving you a consolidated view of disk utilization for your instance.
Remember to restart the CloudWatch agent after making these changes to the configuration file for the new settings to take effect.
Sources
Metrics collected by the CloudWatch agent - Amazon CloudWatch
Manually create or edit the CloudWatch agent configuration file - Amazon CloudWatch
Relevant content
- asked 2 years ago
- asked 7 months ago

This does not work. It just removes device column from the screenshot I posted above and displays all the rows.