A SysOps Administrator is configuring an Amazon CloudWatch metric alarm to monitor the average CPU utilization of an Amazon EC2 Auto Scaling group. The alarm is configured with a period of 60 seconds (1 minute) and an evaluation period of 2. The instances in the Auto Scaling group currently have standard monitoring enabled. The administrator observes that the alarm state frequently fluctuates to INSUFFICIENT_DATA and fails to trigger the configured scaling policies when CPU utilization spikes. What is the correct action to resolve this issue?
- Enable detailed monitoring on the EC2 instances in the Auto Scaling group launch template to ensure CPU utilization metrics are published to CloudWatch at 1-minute intervals.Answer
- BChange the metric statistic from Average to SampleCount so that CloudWatch can aggregate the standard 5-minute metrics into 1-minute intervals.
- CConfigure an Amazon EventBridge rule to capture EC2 CPU metric events and route them directly to the CloudWatch alarm target.
- DReduce the Auto Scaling group's cooldown period to less than 60 seconds to allow the metric data to bypass the scaling lock and update the alarm.
Answer
Enable detailed monitoring on the EC2 instances in the Auto Scaling group launch template to ensure CPU utilization metrics are published to CloudWatch at 1-minute intervals.
The correct action is to enable detailed monitoring because standard monitoring only reports EC2 metrics at 5-minute intervals. By default, a CloudWatch alarm with a 1-minute evaluation period will suffer from missing data and enter the INSUFFICIENT_DATA state. Enabling detailed monitoring increases the metric frequency to 1-minute intervals, providing the necessary data points for the alarm to function correctly.
Step-by-Step Solution
Key Concept
CloudWatch Alarms require metric reporting intervals that align with or are more frequent than the alarm's evaluation period to avoid transitioning into the INSUFFICIENT_DATA state.
Estimated Time:1m 30s