cloud-monitoring-list-time-series-request
できること
Google Cloud Monitoringから指標データを取得するリクエストを書きます。チャートやレポートに使う正確なリクエストの形式がほしい開発者やアナリスト向けです。
使う場面
- ✓チャート用の指標データを取得する、ListTimeSeriesのリクエストが必要なとき。
- ✓Cloud Monitoringの指標のフィルターと集約の設定がほしいとき。
- ✓指標名があり、それに正しいRESTのパラメータがほしいとき。
スキルのリンク
https://github.com/google/skills/blob/main/skills/cloud/cloud-monitoring-list-time-series-request/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のCompute Engineの仮想マシンのCPU使用率の、過去1日の平均を示すListTimeSeriesのリクエストを書いてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは指標の詳細とリソースの設定を読み、フィルター、時間の範囲、集約の部分を含むリクエストを作ります。指標を自分で探すことはしません。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Cloud Monitoring ListTimeSeries Request Generator
Use this skill to translate any Cloud Monitoring metric descriptor into valid,
production-ready ListTimeSeries REST API query parameters (name, filter,
interval.startTime, interval.endTime, aggregation.*, view).
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:cloud-monitoring-list-time-series-request)"
and append agent-skills/1.0 (skill:cloud-monitoring-list-time-series-request) to User-Agent headers.
CRITICAL RULES
- Mandatory Project ID Clarification: You MUST ensure the GCP Project ID
is present in the user prompt, input payload, or environment context (such
as via
gcloud config get-value project). If the Project ID is missing and cannot be resolved, you MUST ask the user to clarify it before generating or executingListTimeSeriesrequests. Do NOT use placeholders for project names.
Workflow
Inspect Metric Metadata
- Use Provided Metric Metadata First: If the user's prompt already
includes metric metadata such as
metric.type,metricKind,valueType, resource types, or label keys, use those values directly instead of calling API tools. - Discover Missing Metadata: If exact metric descriptors including
metric.type,metricKind, andvalueTypeare missing or underspecified, resolve the target metric's descriptor using one of these paths:- Vague Query: If the prompt is vague, such as asking for VM CPU
usage, use the
cloud-monitoring-metric-selectionskill first to identify the specific metric type. - Known Metric Type: If you already have the specific metric type name
such as
compute.googleapis.com/instance/cpu/utilization, but need its descriptor, call thelist_metric_descriptorsMCP tool. If the tool is missing, refer to thecloud-monitoring-metric-selectionskill to configure the Cloud Monitoring MCP server. - Fallback: If the MCP tool cannot be configured, fall back to making a direct Cloud Monitoring API call.
- Vague Query: If the prompt is vague, such as asking for VM CPU
usage, use the
- Identify Key Fields: From the retrieved descriptor, identify key schema
attributes:
type: The Cloud Monitoring metric type string.metricKind:GAUGE,DELTA, orCUMULATIVE.valueType:INT64,DOUBLE,DISTRIBUTION, orBOOL.monitoredResourceTypes: Compatibleresource.typestrings, for example["cloudsql_database", "cloudsql_instance"]. If multiple resource types are listed, select the specificresource.typethat matches the target granularity of the user's request.
Construct Monitoring Filter
The filter parameter is a mandatory string in Cloud Monitoring syntax that
restricts the query to a single metric.type and optional resource and metric
labels:
Single Metric Type Restriction: Every
filterMUST specify exactly onemetric.typeclause using an equality operator. For example:metric.type = "compute.googleapis.com/instance/cpu/utilization"
Monitored Resource Type Filter: MUST include the
resource.typefilter when the target resource granularity is known, preventing collisions across services that share metric types or sub-resources. For example:metric.type = "cloudsql.googleapis.com/database/cpu/utilization" AND resource.type = "cloudsql_database"
Preserve User Literals and IDs: You MUST use literal resource names, IDs, zones, and project parameters provided by the user without alteration. Do NOT override or replace user-specified identifiers with active resources found during metric metadata discovery unless explicitly requested.
Label Type Prefixing:
- Prefix resource-level dimensions, such as instance ID, zone, project,
database ID, or subscription ID, with the
resource.labels.prefix. For example:resource.labels.instance_id = "123456789"resource.labels.database_id = "my-project:my-instance"
- Prefix metric-level dimensions,
- Prefix resource-level dimensions, such as instance ID, zone, project,
database ID, or subscription ID, with the
よくある質問
必要な指標を見つけますか?
いいえ。指標の検索は指標選択のスキルが扱うので、先に指標がわかっている必要があります。
プロジェクトIDは必要ですか?
はい。リクエストにはGoogle CloudのプロジェクトIDが必要で、見つからなければスキルが尋ねます。
仮のプロジェクト名を使いますか?
いいえ。リクエストを生成または実行する前に、実際のプロジェクトの詳細が必要です。
詳細
作者による元の説明
Generates valid Cloud Monitoring ListTimeSeries requests and aggregation specifications from metric descriptors and resource parameters. Use when asked to create, generate, format, or build ListTimeSeries requests, JSON payloads, filter expressions, or aligner/reducer aggregations for Cloud Monitoring metrics and charts. Don't use for metric discovery or metric selection.
repo: google/skills
人気
- GitHubのスター
- 22k
- ランキング
- #10241
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
finding-google-skills
22kセットアップ作業に合うGoogleの公式ガイドを探すようエージェントを支援します。ホスティング、データベース、ストレージ、サインイン、AIモデルの提供などが対象です。
gcloud
22kエージェントが、Google CloudのgcloudコマンドについてWeb検索に頼らず、正確な構文を確かめてから書いたり確認したりできるよう支援します。
google-cloud-recipe-auth
22kエージェントが、Google Cloudのアイデンティティとアクセス(人やサービスがどうサインインし、どの権限を得るか)について、手順を案内できるよう支援します。
google-cloud-recipe-onboarding
22k新しい開発者が、プロジェクトの選択、請求の設定、最初のリソースのデプロイなど、Google Cloudの最初の手順を進められるよう案内します。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。