Soru

Zorluk: OrtaCloudWatch Metrics and Alarms

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?

  1. 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.Cevap
  2. B
    Change the metric statistic from Average to SampleCount so that CloudWatch can aggregate the standard 5-minute metrics into 1-minute intervals.
  3. C
    Configure an Amazon EventBridge rule to capture EC2 CPU metric events and route them directly to the CloudWatch alarm target.
  4. D
    Reduce 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.

Cevap

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.

Adım Adım Çözüm

1
Identify the cause of the INSUFFICIENT_DATA state.
The alarm is configured with a 1-minute period and requires 2 consecutive periods. However, standard monitoring only publishes metrics every 5 minutes, resulting in periods without any data points.
CloudWatch needs metric data points for each evaluation period to determine if the threshold has been crossed.
2
Select the appropriate resolution to increase metric frequency.
Enabling detailed monitoring on the EC2 instances ensures that CPU metrics are sent every 1 minute instead of every 5 minutes.
This guarantees that CloudWatch receives at least one data point per 1-minute period, allowing the alarm to evaluate properly.

Anahtar Kavram

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.
Tahmini Süre:1m 30s
Bu soruyu puanla