Courseiva
Implementing service monitoring strategieshardMultiple ChoiceObjective-mapped

PCDOE Implementing service monitoring strategies Practice Question

You are designing a monitoring strategy for a microservices application running on Google Kubernetes Engine (GKE). You need to create a custom metric that counts the number of failed login attempts from the application logs. The logs are in JSON format and contain a field 'status' with value 'FAILED'. Which approach should you use?

⚠ Common exam trap

Google Cloud often tests the misconception that Metrics Explorer can create metrics from logs, when in fact it only queries and charts existing metrics, while logs-based metrics are the correct service for deriving custom metrics from log data.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Configure a logs-based metric in Cloud Logging that filters for the condition and counts.

A logs-based metric in Cloud Logging directly counts occurrences of a specific log entry pattern (e.g., 'status' = 'FAILED') without requiring additional agents or data exports. This approach is purpose-built for deriving metrics from log data and integrates seamlessly with Cloud Monitoring for alerting and dashboards.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use Cloud Monitoring's Metrics Explorer to create a metric from logs using a filter.

    Why it's wrong here

    Metrics Explorer visualizes existing metrics but cannot create new metrics from logs.

  • Install the Ops Agent on GKE nodes to collect application metrics directly.

    Why it's wrong here

    The Ops Agent collects system and application metrics from VMs, not from logs; it cannot parse log content to count events.

  • Configure a logs-based metric in Cloud Logging that filters for the condition and counts.

    Why this is correct

    Logs-based metrics are designed for this purpose – they count log entries that match a filter and expose them as custom metrics in Cloud Monitoring.

  • Export logs to BigQuery and then create a custom metric from the exported data.

    Why it's wrong here

    Exporting logs to BigQuery introduces latency and additional infrastructure management, whereas the requirement demands real-time metric creation from GKE logs. This approach is tempting because BigQuery excels at ad-hoc analysis of large historical datasets, making it the correct choice for retrospective security audits or long-term trend analysis rather than live monitoring of authentication failures.

About these practice questions

Courseiva writes every PCDOE question from scratch — 486 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCDOE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDOE exam.