cloud-monitoring-metric-selection

Queries Google Cloud Monitoring metric descriptors and filters them by keyword for GCP services.

19.1k|1.5k|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/google/skills --skill cloud-monitoring-metric-selection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-monitoring-metric-selection
Source: https://github.com/google/skills/tree/main/skills/cloud/cloud-monitoring-metric-selection
Command: npx skills add https://github.com/google/skills --skill cloud-monitoring-metric-selection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Finding the right Google Cloud Monitoring metric among thousands of descriptors is slow and error-prone. This Skill retrieves live metric descriptors for a target GCP service and filters them down to the handful of metrics that match your intent.

Core Features & Use Cases

  • Live Metric Discovery: Calls the list_metric_descriptors MCP tool against the Google Cloud Monitoring API to retrieve up-to-date metric descriptors per service prefix.
  • Keyword-Based Local Filtering: Maps user intent (such as CPU, latency, or throughput) to search substrings and filters descriptors by type, display name, and description.
  • Structured Output: Returns 5-15 relevant metrics per service in Markdown tables with metric kind, value type, unit, and monitored resource types.
  • Use Case: Ask which metrics track Cloud Storage bucket write throughput and request count, and receive a curated table of matching storage.googleapis.com metrics for your project.

Quick Start

List the Google Cloud Monitoring metrics for Spanner CPU utilization and latency in my GCP project.

Frequently Asked Questions about cloud-monitoring-metric-selection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find Google Cloud Monitoring metrics for a GCP service?

Query the list_metric_descriptors tool with a filter like metric.type = starts_with("spanner.googleapis.com/") for your project. The returned descriptors can then be filtered locally by keywords against the type, displayName, and description fields.

How to list metric descriptors using the Cloud Monitoring API?

Call the list_metric_descriptors MCP tool with your project name, a starts_with filter on the service prefix, and pageSize 200. If a nextPageToken is returned, keep calling with pageToken until all descriptors are retrieved.

Does metric filtering support multiple GCP services in one query?

No, Cloud Monitoring filters cannot combine multiple metric.type restrictions with OR. You must issue a separate list_metric_descriptors query for each service prefix, either sequentially or in parallel.

Why does list_metric_descriptors return empty results?

Empty results usually mean the target service is not enabled in the project, the filter syntax is wrong, or the wrong prefix style was used. Verify the service is enabled, fix the filter, and check public GCP metrics documentation as a fallback.

What filter prefixes exist for Kubernetes, Istio, and custom metrics?

Use starts_with("kubernetes.io/") for GKE native metrics, istio.io for service mesh, knative.dev for Knative, agent.googleapis.com for Ops Agent guest OS metrics, and custom.googleapis.com or external.googleapis.com for user-defined metrics.