Soru

Zorluk: ZorCloudWatch Metrics and Alarms

A SysOps Administrator is configuring an Amazon CloudWatch alarm to automatically reboot a critical standalone Amazon EC2 instance if its CPU utilization remains above 90% for three consecutive minutes. The administrator configures the alarm with the following settings:

* Metric: CPUUtilization in the AWS/EC2 namespace
* Period: 1 minute
* Evaluation Periods: 3
* Action: EC2 Reboot action (arn:aws:automate:us-east-1:ec2:reboot) when the alarm is in the ALARM state

During testing, the administrator notices two issues: the alarm remains in the INSUFFICIENT_DATA state even when the instance is under heavy load, and the console displays a validation error stating that the EC2 reboot action cannot be associated with the alarm.

Which of the following actions must the administrator take to resolve these issues and ensure the reboot action executes successfully? (Select TWO.)

  1. Enable detailed monitoring on the target EC2 instance.Cevap
  2. Modify the alarm configuration to include the InstanceId dimension specifying the target instance.Cevap
  3. C
    Attach an IAM role with the ec2:RebootInstances permission to the EC2 instance profile.
  4. D
    Change the alarm period to 5 minutes and keep standard monitoring enabled on the EC2 instance.
  5. E
    Increase the alarm evaluation period to match the Auto Scaling group cooldown period to prevent multiple reboot actions.

Cevap

To resolve these issues, the administrator must enable detailed monitoring on the EC2 instance to supply 1-minute metric data points, and modify the alarm configuration to include the InstanceId dimension specifying the target instance, which is required for EC2 alarm actions.
The correct options are to enable detailed monitoring on the EC2 instance and to modify the alarm configuration to include the InstanceId dimension. Enabling detailed monitoring is necessary because the alarm uses a 1-minute period, but standard monitoring only publishes EC2 metrics every 5 minutes, leading to an insufficient data state. Specifying the InstanceId dimension is required because Amazon EC2 alarm actions (such as reboot, stop, terminate, or recover) are only supported on alarms targeting metrics in the AWS/EC2 namespace that contain the InstanceId dimension.

Adım Adım Çözüm

1
Enable detailed monitoring on the target EC2 instance.
The CPUUtilization metric is published to CloudWatch every 1 minute instead of the default 5-minute standard monitoring interval.
This satisfies the alarm's 1-minute period configuration and prevents the alarm from entering the INSUFFICIENT_DATA state.
2
Configure the CloudWatch alarm to filter by the InstanceId dimension.
The alarm is associated with a single EC2 instance, resolving the dimension configuration validation error.
Amazon EC2 alarm actions such as reboot are only supported for metrics in the AWS/EC2 namespace when configured with the InstanceId dimension.

Anahtar Kavram

Configuring CloudWatch alarms with EC2 actions requires detailed monitoring for short evaluation periods and the InstanceId dimension for target identification.
Bu soruyu puanla