DOP-C02 Question 221
Select 2Your company has deployed a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). To monitor the application's performance, you need to analyze HTTP 4xx and 5xx error rates. However, your team also wants to track the performance of specific EC2 instances and their individual CPU utilization. Which combination of metrics and dimensions should you configure in Amazon CloudWatch to achieve this?
- A
Use the 'HTTPCode_ELB_4XX_Count' and 'HTTPCode_ELB_5XX_Count' metrics with the ALB namespace and the 'LoadBalancer' dimension.
- B
Use the 'CPUUtilization' metric with the EC2 namespace and the 'InstanceId' dimension.
- C
Use the 'RequestCount' metric with the ALB namespace and the 'TargetGroup' dimension.
- D
Use the 'HTTPCode_Target_4XX_Count' and 'HTTPCode_Target_5XX_Count' metrics with the ALB namespace and the 'InstanceId' dimension.
- E
Use the 'CPUUtilization' metric with the EC2 namespace and the 'LoadBalancer' dimension.
Show answer and explanation
Correct answers: A, B
Explanation
To monitor HTTP 4xx and 5xx error rates at the load balancer level, you must use the 'HTTPCode_ELB_4XX_Count' and 'HTTPCode_ELB_5XX_Count' metrics from the ALB namespace with the 'LoadBalancer' dimension. To monitor individual EC2 instance CPU utilization, the 'CPUUtilization' metric from the EC2 namespace with the 'InstanceId' dimension is required. These configurations ensure proper scoping and granularity of the metrics for effective monitoring.
- A. Correct.
Correct. The 'HTTPCode_ELB_4XX_Count' and 'HTTPCode_ELB_5XX_Count' metrics in the ALB namespace provide aggregated 4xx and 5xx error rates at the load balancer level. The 'LoadBalancer' dimension ensures the data is scoped to the specific Application Load Balancer.
- B. Correct.
Correct. The 'CPUUtilization' metric in the EC2 namespace is the correct metric to monitor individual instance CPU usage. The 'InstanceId' dimension allows you to track this metric for a specific EC2 instance.
- C. Incorrect.
Incorrect. While the 'RequestCount' metric tracks the number of requests processed by the load balancer, it does not provide information about HTTP errors or CPU utilization.
- D. Incorrect.
Incorrect. The 'HTTPCode_Target_4XX_Count' and 'HTTPCode_Target_5XX_Count' metrics track errors at the target level (e.g., EC2 instances), but 'InstanceId' is not a valid dimension for these metrics. The correct dimension for these metrics is 'TargetGroup'.
- E. Incorrect.
Incorrect. The 'CPUUtilization' metric belongs to the EC2 namespace and does not use the 'LoadBalancer' dimension. Instead, it requires the 'InstanceId' dimension to monitor specific EC2 instances.