Last active
February 6, 2022 14:21
-
-
Save kun432/99c283600aa0f23b6416f913c46bed84 to your computer and use it in GitHub Desktop.
CWAgentのサンプル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"agent": { | |
"metrics_collection_interval": 60, | |
"run_as_user": "root" | |
}, | |
"metrics": { | |
"append_dimensions": { | |
"AutoScalingGroupName": "${aws:AutoScalingGroupName}", | |
"ImageId": "${aws:ImageId}", | |
"InstanceId": "${aws:InstanceId}", | |
"InstanceType": "${aws:InstanceType}" | |
}, | |
"aggregation_dimensions": [ | |
[ | |
"AutoScalingGroupName" | |
] | |
], | |
"metrics_collected": { | |
"collectd": { | |
"metrics_aggregation_interval": 60 | |
}, | |
"cpu": { | |
"measurement": [ | |
"cpu_usage_idle", | |
"cpu_usage_iowait", | |
"cpu_usage_user", | |
"cpu_usage_system" | |
], | |
"metrics_collection_interval": 60, | |
"resources": [ | |
"*" | |
], | |
"totalcpu": false | |
}, | |
"disk": { | |
"measurement": [ | |
"used_percent", | |
"inodes_free" | |
], | |
"metrics_collection_interval": 60, | |
"resources": [ | |
"*" | |
] | |
}, | |
"diskio": { | |
"measurement": [ | |
"io_time", | |
"write_bytes", | |
"read_bytes", | |
"writes", | |
"reads" | |
], | |
"metrics_collection_interval": 60, | |
"resources": [ | |
"*" | |
] | |
}, | |
"mem": { | |
"measurement": [ | |
"mem_used_percent" | |
], | |
"metrics_collection_interval": 60 | |
}, | |
"netstat": { | |
"measurement": [ | |
"tcp_established", | |
"tcp_time_wait" | |
], | |
"metrics_collection_interval": 60 | |
}, | |
"statsd": { | |
"metrics_aggregation_interval": 60, | |
"metrics_collection_interval": 10, | |
"service_address": ":8125" | |
}, | |
"swap": { | |
"measurement": [ | |
"swap_used_percent" | |
], | |
"metrics_collection_interval": 60 | |
}, | |
"procstat": [ | |
{ | |
"exe": "httpd", | |
"measurement": [ | |
"pid_count" | |
], | |
"metrics_collection_interval": 60 | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/opt/aws/amazon-cloudwatch-agent/bin/config.jsonにできるけど、/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.jsonにおかないとCWAgent起動しなかった