0

I am using cloud watch CLI to write a script . As part of this script I need to create an alarm when the status check fails. Steps followed - 1) First I create a launch config for an AMI 2) Then autoscaling group, scale up policy. 3) Now , I need to create a alarm such that when an instance belonging to Ami ( from step 1) fails, then raise an alarm which essentially creates a new instance.

I am having issues with creating an alarm for the same. Help appreciated.

mon-put-metric-alarm TestAlarm --comparisonoperator LessThanToThreshold --evaluation-periods 1 --metric-name StatusCheckFailed --namespace "AWS/EC2" --period 600 --statistic Average --threshold 1 --alarm-actions arn:aws:autoscaling:TestInstance --dimensions "AutoScalingGroupName=TestAutoScalingGroup"

The error received is Status Check failed not recognized.

1 Answer 1

-2

mon-put-metric-alarm AuthServerAlarm --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --region us-west-1 --metric-name StatusCheckFailed_Any --namespace "AWS/EC2" --period 600 --statistic Average --threshold 1 --alarm-actions arn:aws:autoscaling:us-west-1:13445335:scalingPolicy:1234:newGuid:autoScalingGroupName/TestAutoScalingGroup:policyName/LaunchNewInstance,arn:aws:sns:us-west-1:123:Test --dimensions "AutoScalingGroupNameTestAutoScalingGroup"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.