cloud-monitoring-list-time-series-request

Generates valid Cloud Monitoring ListTimeSeries requests and aggregation specifications from metric descriptors.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Constructing correct Cloud Monitoring ListTimeSeries API requests requires deep knowledge of filter syntax, metric kinds, value types, and aligner/reducer combinations, and mistakes produce invalid queries or misleading charts.

Core Features & Use Cases

  • Request Generation: Builds complete ListTimeSeries REST query parameters including filter, interval, aggregation, and view from metric descriptors.
  • Aggregation Selection: Maps metricKind and valueType pairs to correct perSeriesAligner and crossSeriesReducer combinations using a translation matrix with SRE defaults for utilization, counters, distributions, and lag metrics.
  • Live Validation: Verifies generated requests against the list_timeseries MCP tool with HEADERS view before returning output.
  • Use Case: Ask for a query showing CPU utilization per GCE instance over the last hour, and receive a validated JSON request with the correct filter, ALIGN_MEAN aligner, and 60s alignment period.

Quick Start

Generate a Cloud Monitoring ListTimeSeries request for compute.googleapis.com/instance/cpu/utilization grouped by instance over the past hour in my project.

Frequently Asked Questions about cloud-monitoring-list-time-series-request

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

FAQPage Schema
How do I build a Cloud Monitoring ListTimeSeries API request?

Provide the metric type, resource type, and time interval, then construct a filter with metric.type and resource.type clauses, choose perSeriesAligner and crossSeriesReducer based on the metric's kind and value type, and set alignmentPeriod from the lookback duration.

Which aligner and reducer should I use for Cloud Monitoring metrics?

GAUGE numeric metrics default to ALIGN_MEAN with REDUCE_SUM, DELTA or CUMULATIVE counters use ALIGN_RATE with REDUCE_SUM, and DISTRIBUTION metrics use ALIGN_DELTA or percentile aligners. Utilization ratios must never use REDUCE_SUM across instances.

How do I filter Cloud Monitoring metrics by VM instance name?

Use metric.labels.instance_name or metadata.system_labels.name for human-readable GCE instance names, since resource.labels.instance_id expects a numeric ID. Never use resource.metadata.name, which is invalid in Cloud Monitoring filter syntax.

What alignment period should I use for Cloud Monitoring queries?

Set alignmentPeriod based on lookback duration: 60s for up to 110 minutes, 300s up to 23 hours, 3600s up to 6 days, scaling to 172800s for up to 500 days. Omit it only when perSeriesAligner is ALIGN_NONE.

When should I not use this request generator?

Do not use it for metric discovery or metric selection; use the cloud-monitoring-metric-selection skill first when the target metric type is unknown. It also requires a resolvable GCP project ID before generating requests.