Created
April 16, 2018 18:17
-
-
Save mlabouardy/1c2c68166ed59b07602a953bb2410561 to your computer and use it in GitHub Desktop.
Setup CloudWatch alarm with AWS CLI
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
aws cloudwatch put-metric-alarm --region us-east-1 | |
--alarm-name "HighCPUUtilization" | |
--alarm-description "High CPU Utilization" | |
--actions-enabled | |
--alarm-actions "TOPIC_ARN" | |
--metric-name "CPUUtilization" | |
--namespace AWS/EC2 --statistic "Average" | |
--dimensions "Name=InstanceName,Value=demo" | |
--period 60 | |
--evaluation-periods 60 | |
--threshold 40 | |
--comparison-operator "GreaterThanOrEqualToThreshold" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
aws sns create-topic --name cpu-utilization-alarm-topic --region us-east-1