cloud-monitoring-list-time-series-request
Skill này làm gì
Skill này viết yêu cầu lấy dữ liệu metric từ Google Cloud Monitoring. Skill dành cho lập trình viên và nhà phân tích cần đúng định dạng yêu cầu cho một biểu đồ hoặc báo cáo.
Khi nào nên dùng
- ✓Khi bạn cần một yêu cầu ListTimeSeries để lấy dữ liệu metric cho một biểu đồ.
- ✓Khi bạn muốn các thiết lập bộ lọc và tổng hợp cho một metric của Cloud Monitoring.
- ✓Khi bạn có tên metric và cần các tham số REST đúng cho nó.
Liên kết skill
https://github.com/google/skills/blob/main/skills/cloud/cloud-monitoring-list-time-series-request/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Viết yêu cầu ListTimeSeries hiển thị mức sử dụng CPU trung bình của các VM Compute Engine của tôi trong một ngày qua.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill đọc chi tiết metric và thiết lập tài nguyên của bạn, rồi xây dựng yêu cầu với các phần bộ lọc, khoảng thời gian và tổng hợp. Skill không tự tìm metric.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Skill có tìm được metric tôi cần không?
Không. Việc khám phá metric do skill metric selection đảm nhiệm, nên bạn cần biết metric trước.
Tôi có cần ID dự án không?
Có. Yêu cầu cần ID dự án Google Cloud của bạn, và skill sẽ hỏi nếu không tìm thấy.
Skill có dùng tên dự án giả không?
Không. Skill cần chi tiết dự án thật trước khi tạo hoặc chạy yêu cầu.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 22k
- Vị trí xếp hạng
- #10241
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
finding-google-skills
22kGiúp agent của bạn tìm hướng dẫn Google phù hợp cho việc thiết lập, như hosting, cơ sở dữ liệu, lưu trữ, đăng nhập hoặc phục vụ mô hình AI.
gcloud
22kGiúp agent của bạn viết và kiểm tra các lệnh gcloud của Google Cloud, tra cứu cú pháp chính xác trước khi chạy bất cứ thứ gì để không đoán các flag.
google-cloud-recipe-auth
22kHướng dẫn agent của bạn qua quản lý danh tính và quyền truy cập của Google Cloud, gồm cách con người và dịch vụ đăng nhập và những quyền họ nhận được.
google-cloud-recipe-onboarding
22kHướng dẫn một lập trình viên mới qua các bước đầu tiên trên Google Cloud, gồm chọn dự án, liên kết thanh toán và triển khai tài nguyên đầu tiên.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.