Soru

Zorluk: OrtaCloudWatch Metrics and Alarms

A SysOps Administrator is configuring a monitoring and remediation system for a custom application. The application runs on Amazon EC2 instances and publishes a custom metric named TransactionLatency every 10 seconds. The administrator needs to configure an Amazon CloudWatch alarm that triggers within 1 minute of a latency spike, and automatically runs an AWS Systems Manager Automation runbook to remediate the issue. Which two configuration steps should the administrator perform to meet these requirements? (Select TWO.)

  1. Publish the custom metric using the PutMetricData API with the StorageResolution parameter set to 1.Cevap
  2. Create an Amazon EventBridge rule that detects when the CloudWatch alarm changes to the ALARM state, and targets the Systems Manager Automation runbook.Cevap
  3. C
    Enable detailed monitoring on the EC2 instances hosting the application.
  4. D
    Configure the CloudWatch alarm to directly execute the Systems Manager Automation runbook as an alarm action.
  5. E
    Create an AWS Config rule to monitor the custom metric threshold and trigger the Systems Manager Automation runbook as a remediation action.

Cevap

Publishing the custom metric with a storage resolution of 1, and creating an Amazon EventBridge rule that detects when the alarm changes to the ALARM state to target the Systems Manager Automation runbook.
To trigger an alarm within 1 minute, the underlying metric must support sub-minute evaluation periods. Setting the StorageResolution parameter to 1 in the PutMetricData call creates a high-resolution metric, allowing alarm evaluation periods of 10 or 30 seconds. Additionally, because CloudWatch alarms cannot directly call Systems Manager Automation runbooks, the correct approach to automated remediation is to configure an Amazon EventBridge rule that detects the alarm's state change and targets the runbook.

Adım Adım Çözüm

1
Ensure the metric is ingested with high-resolution capabilities.
Publish the metric using the PutMetricData API with the StorageResolution parameter set to 1.
By default, custom metrics are stored at standard 1-minute resolution. High-resolution storage is required to support sub-minute alarm evaluation periods needed to alert within 1 minute of a spike.
2
Configure the CloudWatch alarm evaluation period.
Create a CloudWatch alarm with a period of 10 or 30 seconds.
A sub-minute period is necessary to evaluate the high-resolution data points quickly enough to transition to the ALARM state within 1 minute.
3
Create the automated remediation trigger.
Configure an Amazon EventBridge rule triggered by the CloudWatch alarm state change, setting the target to the Systems Manager Automation runbook.
CloudWatch alarms do not natively support direct invocation of Systems Manager Automation runbooks as actions, so EventBridge must be used as the event router.

Anahtar Kavram

High-resolution CloudWatch custom metrics and automated remediation using Amazon EventBridge
Bu soruyu puanla