Aggregate CPU Utilization for Auto Scaling Group - CloudWatch Metrics | AWS Certified SysOps Administrator

Aggregate CPU Utilization for Auto Scaling Group

Question

There is a three-tier Web Application behind an Application Load Balancer.

Auto Scaling Group is created for EC2 to dynamically scale-out when CPU utilization is higher than 75%

All these EC2 instances are spread across multiple AZ's of the eu-central-1 region.

The operational Director is looking for an aggregate CPU utilization for all EC2 instances part of this Auto Scaling group.

Which of the following CloudWatch Metric setting can be done to meet this requirement?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: C.

For getting an aggregate metric for all EC2 instances in an Auto Scaling group, dimension as “AutoScalingGroupName” can be used.

In the above case, metric “CPUUtilization” can be set for EC2 instance with dimension as “AutoScalingGroupName” to aggregate CPU utilization for all EC2 instances across availability zones.

The following are dimensions can be set for each metric.

AutoScalingGroupName.

ImageId.

InstanceId.

InstanceType.

Option A is incorrect as the aggregation of “CPU Utilization” for each EC2 Instance in an Auto Scaling Group is not required as the same can be displayed using AutoScalingGroupName Dimension.

Option B is incorrect as the aggregation of “CPU Utilization” for each EC2 Instance per Availability Zone in an Auto Scaling Group is not required.

The same can be displayed using AutoScalingGroupName Dimension.

Option D is incorrect as there is no need to create Metrics per Availability Zone.

While choosing dimension as Auto Scaling Group, it will select all EC2 instances in that group irrespective of Availability Zone.

For more information on Aggregating Statistics by Auto Scaling group, refer to the following URL-

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/GetMetricAutoScalingGroup.html

The correct answer to this question is option C. Enable “CPU Utilization” metric for EC2 with dimension as “AutoScalingGroupName” to display aggregate CPU utilization for all EC2 instances.

Explanation:

CloudWatch is the monitoring service provided by AWS. It provides various metrics related to different AWS resources such as EC2 instances, ELB, RDS instances, etc. CPU utilization is one such metric that CloudWatch provides. This metric is used to track the percentage of the CPU utilized by an EC2 instance.

In this scenario, the requirement is to monitor the aggregate CPU utilization of all the EC2 instances part of an Auto Scaling group spread across multiple Availability Zones. Therefore, we need to enable the "CPU Utilization" metric for the EC2 instances with the dimension set as "AutoScalingGroupName." By doing so, we can get the aggregate CPU utilization of all EC2 instances part of that Auto Scaling group.

Option A is incorrect because aggregating CPU utilization metrics for each EC2 instance separately will not give us the aggregate CPU utilization of all instances.

Option B is incorrect because enabling CPU Utilization metric for each EC2 instance within each Availability zone will only give us the CPU utilization for that specific Availability zone. It will not give us the aggregate CPU utilization of all EC2 instances part of that Auto Scaling group.

Option D is incorrect because enabling CPU Utilization metric for each EC2 instance within each Availability zone with dimension set as "AutoScalingGroupName" will not give us the aggregate CPU utilization of all EC2 instances part of that Auto Scaling group.

Hence, option C is the correct answer.