Skip to content

Instantly share code, notes, and snippets.

@caike
Created June 1, 2021 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caike/3b3d0b4803651cc54f79466e76f68422 to your computer and use it in GitHub Desktop.
Save caike/3b3d0b4803651cc54f79466e76f68422 to your computer and use it in GitHub Desktop.
AWS CloudWatch agent simple config for CPU and memory monitoring
{
"agent": {
"metrics_collection_interval": 60,
"run_as_user": "root"
},
"metrics": {
"append_dimensions": {
"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": 60,
"totalcpu": true
},
"mem": {
"measurement": ["mem_used_percent"],
"metrics_collection_interval": 60
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment