Config schema doesn't include parse_data_dog_tags field for statsd.
When attempting to process a config file which includes the parse_data_dog_tags field, the config file is marked as invalid due to failing schema:
****** processing amazon-cloudwatch-agent ******
/opt/aws/amazon-cloudwatch-agent/bin/config-downloader --output-dir /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d --download-source file:/tmp/amazon-cloudwatch-agent.json --mode ec2 --config /opt/aws/amazon-cloudwatch-agent/etc/common-config.toml --multi-config default
Successfully fetched the config and saved in /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/file_amazon-cloudwatch-agent.json.tmp
Start configuration validation...
/opt/aws/amazon-cloudwatch-agent/bin/config-translator --input /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json --input-dir /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d --output /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml --mode ec2 --config /opt/aws/amazon-cloudwatch-agent/etc/common-config.toml --multi-config default
2021/12/15 14:06:40 Reading json config file path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/file_amazon-cloudwatch-agent.json.tmp ...
2021/12/15 14:06:40 Invalid Json input schema.
2021/12/15 14:06:40 Under path : /metrics/metrics_collected/statsd | Error : Additional property parse_data_dog_tags is not allowed
2021/12/15 14:06:40 Configuration validation first phase failed. Agent version: 1.0. Verify the JSON input is only using features supported by this version.
File in question:
{
"agent": {
"run_as_user": "cwagent",
"omit_hostname": true
},
"metrics": {
"metrics_collected": {
"statsd": {
"metrics_aggregation_interval": 60,
"metrics_collection_interval": 10,
"service_address": ":8125",
"parse_data_dog_tags": true
}
},
"append_dimensions": {
"InstanceType": "${aws:InstanceType}"
},
"aggregation_dimensions": [
[],
[
"InstanceType"
]
]
}
}
Hello, thanks for submitting your request. We currently don’t support this feature today. I can bring this up with the team to review the impact of adding such feature.
Could you elaborate on the use case and what additional information you will get out of the agent into cloudwatch metrics by enabling this feature?
Thank you for getting back to me.
From what I see in the code (https://github.com/aws/amazon-cloudwatch-agent/blob/c785fd73b33c5b2793c3f5934f2aa66a9a016eb9/plugins/inputs/statsd/statsd_test.go#L712) this feature is already implemented and supported.
All that is required is that it is "enabled" by adjusting the JSON schema. Perhaps there's a reason why this isn't enabled - if it isn't supported by the CloudWatch metric aggregation system, then it'd be good to state that.
The value comes from the familiarity with the datadog tagging scheme. You could add arbitrary dimensions to your metrics without the need to predefine them at the agent level.