AWS auto group scaling causes constant alarm

I currently use two scaling policies that are tied to my autoscale group: A

  • The scaling policy that is invoked when a CloudWatch call is invoked. This CloudWatch alarm uses the CPUUtilization metric and is triggered by more than 80% in the CPU.
  • The other is a scaling policy that is invoked when another CloudWatch signal is invoked. This CloudWatch signal uses the CPUUtilization indicator and is triggered when the processor is at less than 50%.

A side effect of this approach is that when my ASG instances are idle (completely reduced, processing does not occur), my ASG is in an alarm state.

Is there a way to set this differently so that my ASG is not in a constant state of alert?

Below is a segment of these alarms from my CloudFormation template:

"ScaleUpPolicy" : { "Type" : "AWS::AutoScaling::ScalingPolicy", "Properties" : { "AdjustmentType" : "ChangeInCapacity", "AutoScalingGroupName" : { "Ref" : "WebApplicationASG" }, "Cooldown" : "1", "ScalingAdjustment" : "1" } }, "CPUAlarmHigh": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "EvaluationPeriods": "1", "Statistic": "Average", "Threshold": "80", "AlarmDescription": "Alarm if CPU too high or metric disappears indicating instance is down", "Period": "60", "AlarmActions": [ { "Ref": "ScaleUpPolicy" } ], "Namespace": "AWS/EC2", "Dimensions": [ { "Name": "AutoScalingGroupName", "Value": { "Ref": "WebApplicationASG" } } ], "ComparisonOperator": "GreaterThanThreshold", "MetricName": "CPUUtilization" } }, "ScaleDownPolicy" : { "Type" : "AWS::AutoScaling::ScalingPolicy", "Properties" : { "AdjustmentType" : "ChangeInCapacity", "AutoScalingGroupName" : { "Ref" : "WebApplicationASG" }, "Cooldown" : "1", "ScalingAdjustment" : "-1" } }, "CPUAlarmLow": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "EvaluationPeriods": "1", "Statistic": "Average", "Threshold": "50", "AlarmDescription": "Alarm if CPU is low, causing scale down", "Period": "60", "AlarmActions": [ { "Ref": "ScaleDownPolicy" } ], "Namespace": "AWS/EC2", "Dimensions": [ { "Name": "AutoScalingGroupName", "Value": { "Ref": "WebApplicationASG" } } ], "ComparisonOperator": "LessThanThreshold", "MetricName": "CPUUtilization" } }, 
+6
source share
2 answers

This is normal and expected behavior.

The presence of an indicator in an alarm state is not a problem - remember that this is a change in the alarm state that causes events. Thus, presumably, as soon as your trigger increases, the alarm will stop. Then, when the metric is lowered, it returns to the alarm state and a zoom out event is triggered.

+4
source

You can hide them in the console by clicking the "Hide car alarm lock" button.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/hide-autoscaling-alarms.html

Still not perfect, but better than nothing.

0
source

All Articles