Bird
0
0

You want to create a CloudWatch Logs metric filter that counts the number of ERROR messages in your logs. Which filter pattern should you use?

hard📝 Application Q9 of 15
AWS - CloudWatch
You want to create a CloudWatch Logs metric filter that counts the number of ERROR messages in your logs. Which filter pattern should you use?
A[ERROR]
B"ERROR"
C{ $.level = "ERROR" }
DERROR*
Step-by-Step Solution
Solution:
  1. Step 1: Understand metric filter patterns

    Simple string match patterns use quotes around the keyword to match log events containing that word.
  2. Step 2: Identify correct syntax

    Using "ERROR" matches any log event containing the word ERROR.
  3. Final Answer:

    "ERROR" -> Option B
  4. Quick Check:

    Metric filter string match uses quotes [OK]
Quick Trick: Use quotes for string match in metric filters [OK]
Common Mistakes:
MISTAKES
  • Using brackets incorrectly
  • Trying JSON syntax without JSON logs
  • Using wildcard incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes