Created
April 11, 2021 12:28
-
-
Save froop/298076aabc59df80f242ca499dcf4fc2 to your computer and use it in GitHub Desktop.
[AWS][Bash] cloudwatch get-metric-statistics
This file contains 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
aws cloudwatch get-metric-statistics --namespace AWS/EC2 --metric-name CPUUtilization --start-time $(date +"%Y-%m-%dT%H:%M:%S+09:00" --date='15 minutes ago') --end-time $(date +"%Y-%m-%dT%H:%M:%S+09:00") --period 300 --statistics Average --dimensions Name=InstanceId,Value=${EC2_INSTANCE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment