Soru

Zorluk: OrtaCloudWatch Metrics and Alarms

A SysOps Administrator is configuring an Amazon CloudWatch alarm to monitor the CPUUtilization metric of an Amazon EC2 instance. The administrator wants the alarm to trigger within 2 minutes of the CPU utilization exceeding 90%. The alarm is configured with a period of 60 seconds and an evaluation period of 2 consecutive periods. During testing, CPU utilization is sustained at 95% for 4 minutes, but the alarm fails to transition to the ALARM state.

Which action will resolve this issue and meet the monitoring requirement?

  1. Enable detailed monitoring on the EC2 instance.Cevap
  2. B
    Change the alarm period to 30 seconds to force CloudWatch to retrieve the CPU utilization data points at a higher frequency.
  3. C
    Create an Amazon EventBridge rule that detects when the CPU utilization threshold is exceeded and invokes an AWS Systems Manager Automation runbook to transition the alarm state.
  4. D
    Reduce the scale-in cooldown period of the Auto Scaling group associated with the instance to 60 seconds to speed up alarm evaluation.

Cevap

Enable detailed monitoring on the EC2 instance.
Enabling detailed monitoring on the Amazon EC2 instance changes the metric reporting frequency from 5 minutes (standard monitoring) to 1 minute. Since the alarm is configured with a 60-second period and requires 2 consecutive periods to breach (totaling 2 minutes), detailed monitoring ensures that CloudWatch receives the necessary data points at 1-minute intervals to evaluate and trigger the alarm within the 2-minute window.

Adım Adım Çözüm

1
Analyze the metric reporting frequency of the default EC2 configuration.
By default, Amazon EC2 sends metrics to CloudWatch using standard monitoring, which has a 5-minute reporting interval.
To understand why the alarm configured with a 60-second period and 2 evaluation periods (requiring 2 minutes of data) is not triggering, we must determine how often data is sent.
2
Identify the requirement for the 60-second period alarm.
A 60-second period alarm requires new metric data points every minute to evaluate consecutive breaching periods correctly.
If data is only sent every 5 minutes, CloudWatch cannot evaluate 2 consecutive 1-minute periods in a timely manner, delaying the alarm transition.
3
Select the correct action to increase metric reporting frequency.
Enabling detailed monitoring changes the reporting interval of EC2 metrics (including CPUUtilization) to 1 minute.
This provides the necessary 1-minute granularity for the alarm to evaluate and trigger within the 2-minute requirement.

Anahtar Kavram

CloudWatch Standard vs. Detailed Monitoring for EC2
Bu soruyu puanla