Soru

Zorluk: KolayCloudWatch Logs and Metric Filters

A SysOps Administrator is monitoring an application log group in Amazon CloudWatch Logs. The administrator has created a metric filter to match the term 'AccessDenied' and configured it to increment a custom metric named 'AccessDeniedCount'. The administrator now needs to ensure that the security team receives an email notification whenever this error occurs.

What is the next step the administrator must take to send an email notification when the error occurs?

  1. Create a CloudWatch alarm based on the custom metric 'AccessDeniedCount' and configure it to send a notification to an Amazon SNS topic subscribed to the security team's email.Cevap
  2. B
    Enable Detailed Monitoring on the log group to trigger an email alert through the standard CloudWatch logging daemon.
  3. C
    Configure a log retention policy on the log group to forward matching events directly to the security team's email address.
  4. D
    Create an Amazon EventBridge rule that monitors the log group directly and uses a Systems Manager Automation runbook to email the team.

Cevap

Create a CloudWatch alarm based on the custom metric 'AccessDeniedCount' and configure it to send a notification to an Amazon SNS topic subscribed to the security team's email.
To send alerts based on log events, you must follow the CloudWatch log monitoring pattern: Metric Filter -> Custom Metric -> CloudWatch Alarm -> SNS Topic. The correct answer successfully describes this chain by configuring the alarm on the custom metric to notify an SNS topic that has the security team's email as a subscriber.

Adım Adım Çözüm

1
Use the custom metric generated by the CloudWatch Logs metric filter.
The numerical metric 'AccessDeniedCount' represents the volume of matching events.
Metric filters extract numerical metrics from log files but cannot send notifications directly.
2
Create a CloudWatch alarm on the custom metric with a threshold >= 1.
The alarm shifts into the ALARM state when the 'AccessDenied' pattern is matched in the logs.
Alarms evaluate metric values against defined limits to trigger automated actions.
3
Configure the alarm's action to send notifications to an Amazon Simple Notification Service (Amazon SNS) topic.
Amazon SNS sends an email to subscribed addresses when the alarm transitions to ALARM.
Amazon SNS is the standard mechanism to deliver email notifications from CloudWatch Alarms.

Anahtar Kavram

Integrating CloudWatch metric filters with alarms and SNS notifications for alerting
Tahmini Süre:1m 0s
Bu soruyu puanla