Question

Difficulty: MediumCloudWatch Metrics and Alarms

A SysOps Administrator is monitoring an Amazon EC2 instance that hosts a legacy transaction processing application. To detect transient CPU utilization spikes as quickly as possible, the administrator configures an Amazon CloudWatch alarm with a period of 60 seconds (1 minute) and an evaluation period of 1. However, the alarm remains in the INSUFFICIENT_DATA state, and CPU utilization spikes are not triggering the alarm. Which of the following actions will resolve this issue?

  1. Enable detailed monitoring on the EC2 instance so that metric data is published to CloudWatch at 1-minute intervals.Answer
  2. B
    Modify the alarm configuration to use a period of 5 minutes, as standard monitoring publishes EC2 metrics to CloudWatch at 1-minute intervals but aggregates them every 5 minutes.
  3. C
    Configure an Amazon EventBridge rule to trigger an AWS Systems Manager Automation document that periodically pulls the CPUUtilization metric from the instance OS.
  4. D
    Reduce the Auto Scaling group cooldown period to 60 seconds to force the EC2 instance to report its metric data at a faster rate.

Answer

Enable detailed monitoring on the EC2 instance so that metric data is published to CloudWatch at 1-minute intervals.
The correct answer is to enable detailed monitoring on the EC2 instance. By default, Amazon EC2 uses standard monitoring, which reports metrics (like CPUUtilization) to CloudWatch at 5-minute intervals. When an alarm is configured with a 60-second period, it expects data points at least every minute. Without detailed monitoring enabled, the lack of data points causes the alarm to enter the INSUFFICIENT_DATA state. Enabling detailed monitoring changes the reporting interval to 1 minute, resolving the issue while maintaining the fast detection period.

Step-by-Step Solution

1
Analyze the alarm configuration and the current metric state.
The CloudWatch alarm is configured with a 1-minute period (60 seconds), but the alarm is in the INSUFFICIENT_DATA state.
By default, Amazon EC2 instances use standard monitoring, which sends metrics to CloudWatch at 5-minute intervals. An alarm with a 1-minute period will not have data points for every evaluation window, resulting in an insufficient data state.
2
Evaluate the requirement for rapid detection.
The requirement is to detect transient CPU utilization spikes as quickly as possible.
Keeping the alarm period at 1 minute is necessary to meet this requirement. Increasing the alarm period to 5 minutes would reduce the detection speed.
3
Select the correct mechanism to increase metric frequency.
Enabling detailed monitoring on the EC2 instance is the standard way to increase the frequency of EC2 hypervisor metrics (such as CPUUtilization) from 5-minute intervals to 1-minute intervals.
This provides the required 1-minute data points, allowing the 1-minute alarm to function properly and trigger quickly on spikes.

Key Concept

CloudWatch Standard vs. Detailed Monitoring for EC2 Instances
Estimated Time:1m 30s
Rate this question