aws / aws/amazon-cloudwatch-agent
Supporting enabling omit_hostname for statsd but disabled for collectd,disk and mem
- Dominant language
- Go
- Stars
- 550
- Forks
- 271
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 13
Description
**Is your feature request related to a problem? Please describe.**
As of now its looks like omit_hostname is a global config and it causes the host metrics to be removed from all other fields as well.
1. My simple requirements is to use statsd in the orignal form without adding any new dimension of `host`
2. I want to generate adittional metrics which are published by collectd and disk but also aggregated by some dimension of aws asg group , instance types.
as of now doing both together does not work well for me.
**Describe the solution you'd like**
Support the configuration at child level ?
**Describe alternatives you've considered**
Moving to telegraf probably
**Additional context**
Here is my configuration that does not work well
```
{
"agent": {
"metrics_collection_interval": 10,
"run_as_user": "root",
"omit_hostname" : true
},
"metrics": {
"metrics_collected": {
"statsd":{
"service_address":":8125",
"metrics_collection_interval":10,
"metrics_aggregation_interval":60
},
"collectd": {
"metrics_aggregation_interval": 10
},
"disk": {
"measurement": [
"used_percent"
],
"metrics_collection_interval": 10,
"resources": [
"/"
]
},
"mem": {
"measurement": [
"mem_used_percent"
],
"metrics_collection_interval": 10
}
}
},
"logs": {
"logs_collected": {
"files": {
"collect_list": [
{
"file_path": "/home/ubuntu/logs/app.log",
"log_group_name": "/aws/ec2/application",
"log_stream_name": "{instance_id}"
}
]
}
}
}
}
```
Contributor guide
Research direction
Start by tracing how agent.omit_hostname is applied to the metrics_collected child sections, especially statsd, collectd, disk, and mem. The change is complete when statsd can omit the host dimension independently while collectd, disk, and mem retain it, with configuration behavior and validation covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100