-
-
Save ardeshir/45a4b3cce3af4a1d99e803988085aaf9 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