Soru

Zorluk: KolayCloudWatch Metrics and Alarms

A SysOps Administrator is setting up monitoring and automated remediation for a standalone Amazon EC2 instance. The administrator needs to configure a CloudWatch alarm to detect CPU utilization spikes and automatically reboot the instance if CPU utilization exceeds 90% for three consecutive 1-minute periods. Which TWO of the following configuration steps are required to achieve this goal?

  1. Enable detailed monitoring on the EC2 instance to allow CloudWatch to receive metric data at 1-minute intervals.Cevap
  2. Configure the CloudWatch alarm to trigger an EC2 Action that reboots the instance when the alarm state is reached.Cevap
  3. C
    Keep standard monitoring enabled on the EC2 instance since default EC2 metrics are sent to CloudWatch every 1 minute.
  4. D
    Create an Amazon EventBridge rule that directly monitors the EC2 instance's OS logs to trigger a reboot.
  5. E
    Configure an Auto Scaling lifecycle hook with a 300-second cooldown period to reboot the instance.

Cevap

To achieve the goal, enable detailed monitoring on the EC2 instance and configure the CloudWatch alarm to trigger an EC2 Action that reboots the instance.
Detailed monitoring must be enabled to monitor EC2 metrics at 1-minute intervals. The CloudWatch alarm can then be configured to execute an EC2 Action to reboot the instance automatically when the alarm is triggered.

Adım Adım Çözüm

1
Determine metric granularity requirements.
Standard monitoring provides 5-minute intervals, which cannot satisfy the 1-minute evaluation period. Detailed monitoring must be enabled to get 1-minute metric intervals.
The alarm is configured to evaluate CPU utilization over three consecutive 1-minute periods.
2
Configure the automated remediation action.
Create a CloudWatch alarm action using the native EC2 Actions to reboot the instance.
CloudWatch alarms can execute native EC2 actions directly without additional event routers or functions.

Anahtar Kavram

CloudWatch Detailed Monitoring and Alarm Actions
Bu soruyu puanla