aws / aws/amazon-cloudwatch-agent
Support 'ignore_file_system_types' on diskio metrics in agent configuration file
- Dominant language
- Go
- Stars
- 550
- Forks
- 271
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 13
Description
When constructing a CloudWatch Agent configuration file as per the [AWS instructions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html) to capture metrics across our EC2 fleet, it is possible to ignore file systems for the DISK metric group, using the 'ignore_file_system_types' field name, e.g.:
`"ignore_file_system_types": [
"sysfs", "tmpfs", "devtmpfs", "squashfs"
]`
This works quite nicely. However, when logging DISKIO metrics, the 'ignore_file_system_types' field is not supported.
This causes the unnecessary logging of diskio metrics for snap/loop mounts, of which there are many on each EC2 instance.
The only workaround is to specifically include an array of disk resources to be logged, however the disks are different between our EC2 instances and may change as volumes are added/removed. We use a common CloudWatch agent configuration.
Could you please consider supporting the ignore_file_system_types field on the 'diskio' metric group?
(Or as an alternative solution, support regex on the 'resources' field?)
Contributor guide
Research direction
No source file or test is named. Start by tracing the existing disk metric configuration handling and compare it with diskio, using the AWS configuration documentation as the behavioral reference. Done means diskio accepts ignore_file_system_types and excludes the listed file-system types, with tests covering the configuration and filtering behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100