Courseiva
Implementing service monitoring strategiesmediumMultiple SelectObjective-mapped

PCDOE Implementing service monitoring strategies Practice Question

Which TWO options are valid methods to create a custom metric descriptor in Cloud Monitoring?

⚠ Common exam trap

Google Cloud often tests the distinction between creating a metric descriptor (the schema) and writing metric data (time series); candidates confuse log-based metrics (which auto-create a descriptor) with the explicit creation of a custom descriptor, or assume that any tool that produces metrics (like Prometheus exporters) directly creates a descriptor, when in fact the Ops Agent handles descriptor creation automatically for Prometheus endpoints.

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

Using the gcloud commands: gcloud monitoring metrics create

The `gcloud monitoring metrics create` command directly invokes the Cloud Monitoring API to create a custom metric descriptor. Option E is correct because the Cloud Monitoring API's `CreateMetricDescriptor` method is the programmatic way to define a custom metric, specifying its type, unit, and labels. Both methods result in a new metric descriptor being registered in the project's metric store.

Answer analysis

Option-by-option breakdown

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

  • Creating a log-based metric

    Why it's wrong here

    Log-based metrics create metrics from logs, but they are not custom metric descriptors.

  • Using the gcloud commands: gcloud monitoring metrics create

    Why this is correct

    gcloud CLI can create custom metric descriptors.

  • Using Terraform resource google_monitoring_metric_descriptor

    Why it's wrong here

    Terraform can create descriptors, but the question asks for exactly two, and the most common are API and gcloud.

  • Deploying a Prometheus exporter with the Ops Agent

    Why it's wrong here

    This collects metrics but does not create a metric descriptor.

  • Using the Cloud Monitoring API CreateMetricDescriptor

    Why this is correct

    API allows programmatic creation of custom metric descriptors.

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.