Skip to content

Instantly share code, notes, and snippets.

@Kelvinskell
Last active December 10, 2023 13:58
Show Gist options
  • Save Kelvinskell/d93be79bcbe31008decda7c3b5e25e5c to your computer and use it in GitHub Desktop.
Save Kelvinskell/d93be79bcbe31008decda7c3b5e25e5c to your computer and use it in GitHub Desktop.
AWS CloudWatch Agent coniguration File
{
"agent": {
"metrics_collection_interval": 30,
"run_as_user": "root"
},
"metrics": {
"aggregation_dimensions": [
[
"InstanceId"
]
],
"append_dimensions": {
"AutoScalingGroupName": "${aws:AutoScalingGroupName}",
"ImageId": "${aws:ImageId}",
"InstanceId": "${aws:InstanceId}",
"InstanceType": "${aws:InstanceType}"
},
"metrics_collected": {
"cpu": {
"measurement": [
"cpu_usage_idle",
"cpu_usage_iowait",
"cpu_usage_user",
"cpu_usage_system"
],
"metrics_collection_interval": 30,
"resources": [
"*"
],
"totalcpu": false
},
"disk": {
"measurement": [
"used_percent",
"inodes_free"
],
"metrics_collection_interval": 30,
"resources": [
"*"
]
},
"diskio": {
"measurement": [
"io_time"
],
"metrics_collection_interval": 30,
"resources": [
"*"
]
},
"mem": {
"measurement": [
"mem_used_percent"
],
"metrics_collection_interval": 30
},
"swap": {
"measurement": [
"swap_used_percent"
],
"metrics_collection_interval": 30
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment