Closed sethAmazon closed 1 month ago
JMX metrics require having host just like cpu metrics.
Add host as a metric to jmx metrics unless omit_hostname is true
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
{ "agent": { "debug": true }, "namespace": "HostnameTest", "metrics_collected": { "cpu": { "resources": [ "*" ], "measurement": [ {"name": "cpu_usage_idle", "rename": "CPU_USAGE_IDLE", "unit": "Percent"}, {"name": "cpu_usage_nice", "unit": "Percent"}, "cpu_usage_guest" ], "totalcpu": false, "drop_original_metrics": [ "cpu_usage_guest" ], "metrics_collection_interval": 10 }, "jmx": [ { "endpoint": "localhost:2020", "jvm": [] } ] } } }
{ "agent": { "debug": true, "omit_empty": true }, "metrics": { "append_dimensions": { "ImageId": "${aws:ImageId}", "InstanceId": "${aws:InstanceId}", "InstanceType": "${aws:InstanceType}", "AutoScalingGroupName": "${aws:AutoScalingGroupName}" }, "namespace": "HostnameTest", "metrics_collected": { "cpu": { "resources": [ "*" ], "measurement": [ {"name": "cpu_usage_idle", "rename": "CPU_USAGE_IDLE", "unit": "Percent"}, {"name": "cpu_usage_nice", "unit": "Percent"}, "cpu_usage_guest" ], "totalcpu": false, "drop_original_metrics": [ "cpu_usage_guest" ], "metrics_collection_interval": 10 }, "jmx": [ { "endpoint": "localhost:2020", "jvm": [] } ] } } }
Before commit the code, please do the following steps.
make fmt
make fmt-sh
make lint
Description of the issue
JMX metrics require having host just like cpu metrics.
Description of changes
Add host as a metric to jmx metrics unless omit_hostname is true
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
Requirements
Before commit the code, please do the following steps.
make fmt
andmake fmt-sh
make lint