Search code examples
amazon-web-servicesamazon-ec2amazon-cloudwatchalarmautoscaling

Does the alarm monitor the whole autoscaling group


When I set up an alarm for an Amazon EC2 Auto Scaling group to scale up when CPU utilization is larger than 80%, will it calculate a mean CPU utilization value of all the instances in the group? Or it just randomly monitor one instance of the group?

Lots of code include the parameter “dimensions”, what does it mean?


Solution

  • The Amazon CloudWatch metric is calculated against all instances in the Auto Scaling group.

    Thus, for a CPU Utilization metric, it will take the average CPU Utilization of all instances in the Auto Scaling group. If the average exceeds 80%, it will add additional instances (as defined in your scaling policy).

    This means that some instances might be 100% and some might be 0%. It is only the average CPU Utilization of all instances that will trigger the alarm.

    Dimensions are sub-categories of metrics. For example, an Amazon EC2 CPU Utilization metric will have dimensions for Instance ID, Instance Type and Auto Scaling Group. They allow metrics to be filtered to specific subsets rather than applying to all instances.