Bird
0
0

You created a log-based metric with filter severity = "ERROR" OR severity = "CRITICAL", but the metric shows zero counts. What is the likely problem?

medium📝 Debug Q14 of 15
GCP - Cloud Monitoring and Logging
You created a log-based metric with filter severity = "ERROR" OR severity = "CRITICAL", but the metric shows zero counts. What is the likely problem?
AThe filter syntax is invalid; OR is not supported in log-based metric filters
BSeverity levels ERROR and CRITICAL do not exist
CThe logs do not have severity fields
DThe metric needs at least 24 hours to show data
Step-by-Step Solution
Solution:
  1. Step 1: Check if the filter syntax is valid

    The syntax severity = "ERROR" OR severity = "CRITICAL" is valid; OR is supported in log-based metric filters.
  2. Step 2: Understand impact of zero counts

    A valid filter with zero counts indicates no matching logs, likely because the logs do not have severity fields or lack ERROR/CRITICAL values.
  3. Final Answer:

    The logs do not have severity fields -> Option C
  4. Quick Check:

    Valid filter + zero = no matching logs [OK]
Quick Trick: Zero metric despite valid filter usually means no matching log entries [OK]
Common Mistakes:
  • Assuming filter syntax invalid
  • Thinking OR unsupported
  • Waiting 24 hours unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes