CLOUD-DEPLOYMENT-AND-OPERATIONS practice question 2 of 15

(Which action must be used to create a metric filter in the Amazon CloudWatch console?)

Full set: 67 questions
Answer options
A: Enable an alarm
B: Define a trace
C: Select a log group Correct answer
D: Specify a stream
Correct Answer:
C. Select a log group
Explanation

A metric filter is used to search for and match terms or patterns in log events within Amazon CloudWatch Logs. The filter then transforms this log data into a publishable CloudWatch metric. The fundamental prerequisite for creating a metric filter is to define its data source. In CloudWatch, the source for log events is always a log group. Therefore, the first required action in the console is to select the specific log group on which the filter will be applied.

Why Incorrect

A. Enable an alarm: An alarm is a separate CloudWatch feature that is configured to watch a metric. You can create an alarm based on the metric generated by a filter, but it is a subsequent, optional step, not a prerequisite for creating the filter itself.
B. Define a trace: Traces are associated with AWS X-Ray, a service for analyzing and debugging distributed applications. This is a distinct service and concept from creating a metric filter in CloudWatch Logs.
D. Specify a stream: A metric filter operates on all log streams within a selected log group. You do not specify an individual log stream when creating the filter; the scope is the entire log group.

References

1. AWS CloudWatch Logs User Guide: In the section "Creating metric filters," the procedure begins with selecting a log group. The guide states, "You can create metric filters in the CloudWatch console... 1. Open the CloudWatch console... 2. In the navigation pane, choose Log groups. 3. Choose the name of the log group to create the metric filter for."

Source: AWS Documentation, CloudWatch Logs User Guide, "Creating metric filters from log events".

2. AWS Well-Architected Labs (Educational Resource): In labs designed for educational purposes, the process for monitoring applications consistently shows that metric filters are bound to log groups. For example, in the "Level 300: Implementing Application Monitoring with Amazon CloudWatch" lab, Step 3, "Create a Metric Filter," instructs the user to first navigate to and select the appropriate log group before defining the filter pattern.

Source: AWS Well-Architected Labs, 300CloudWatchforAppMonitoring, "Create a Metric Filter".

Scroll to Top