cloud-monitoring
🐉 Skill for interacting with Google Cloud Monitoring (CM) via APIs to avoid large context bloat. Produces nice short synoptic "gists" of graphs
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-12
- Stars
- ★ 131
- Forks
- 9
01 前言 Front Matter
- name
- cloud-monitoring
- tools
- [ "mcp_google-monitoring_get_alert", "mcp_google-monitoring_get_alert_policy", "mcp_google-monitoring_get_dashboard", "mcp_google-monitoring_list_alert_policies", "mcp_google-monitoring_list_alerts", "mcp_google-monitoring_list_dashboards", "mcp_google-monitoring_list_metric_descriptors", "mcp_google-monitoring_list_timeseries", "mcp_google-monitoring_query_range" ]
- metadata
- { "author": "Riccardo Carlesso", "version": "0.2.17" }
- description
- 🐉 Skill for interacting with Google Cloud Monitoring (CM) via APIs to avoid large context bloat. Produces nice short synoptic "gists" of graphs
02 资源文件 11
- 资产文件assets/gke_logbased.png51.9 KB
- 资产文件assets/gke_popular.png108.7 KB
- 资产文件assets/gke_service.png97.1 KB
- 参考文档CHANGELOG.md6.5 KB
- 参考文档references/descriptive_stats_sample.txt1.4 KB
- 资产文件references/sample_output_dual_metrics.csv2.9 KB
- 资产文件references/sample_output_gke_cpu.csv5.6 KB
- 脚本scripts/export_timeseries_to_csv.py13.1 KB
- 脚本scripts/README.md1.5 KB
- 脚本scripts/setup-frontend-slo.sh3.4 KB
- 参考文档TODO.md596 B
03 SKILL.md 正文
Cloud Monitoring
⚠️ PREREQUISITE:
google-monitoringMCP Server This skill relies on thegoogle-monitoringMCP server being installed and active. Before proceeding with monitoring tasks, assert that the required MCP tools (e.g.,mcp_google-monitoring_query_range) are available. If they are missing, immediately inform the user and recommend they enable the MCP server (they can use thegcp-mcp-setupskill if available).
This skill provides utilities for analyzing and extracting data from Google Cloud Monitoring (CM).
Best Practices
- Avoid Context Bloat: Cloud Monitoring API responses can be massive. Do not try to read raw JSON responses directly into the LLM context. Try to delegate to a SubAgent anything which pulls monitoring data as they tend to bloat the context.
- Use Export Scripts: If you pull monitoring data, make sure to surface this final data (in CSV format) using the
scripts/export_timeseries_to_csv.pyPython script to surface important stats like AVG, Max, Min and a simplified text-graph of the system (seereferences/sample_output_dual_metrics.csv) . Also report back that stats header to the main agent, together with any interesting insights you might have found. - Metadata Headers: Exported data should contain metadata (time ranges, metric names) at the top of the file so that the context of "when" the data was pulled is never lost, as
now()changes over time. - Target Workloads: Focus your monitoring extractions primarily on GKE and Cloud Run environments. Generic time-series extractions should still allow filtering by specific resources.
- Paired Metrics Comparison: The extraction script supports querying multiple metrics simultaneously. For apples-to-apples comparisons, try these recommended pairs:
- Network I/O:
compute.googleapis.com/instance/network/received_bytes_countvscompute.googleapis.com/instance/network/sent_bytes_count - Disk I/O:
compute.googleapis.com/instance/disk/read_bytes_countvscompute.googleapis.com/instance/disk/write_bytes_count - Cloud Run Traffic:
run.googleapis.com/request_countvsrun.googleapis.com/response_latencies - GKE Memory vs CPU:
kubernetes.io/container/memory/used_bytesvskubernetes.io/container/cpu/core_usage_time
- Network I/O:
Available Tools
scripts/export_timeseries_to_csv.py: Fetches time-series data for specified metric(s) and time range, outputting a CSV file with metadata headers. Supports extracting two or more variables for direct correlation and comparison. This is an amazing synoptic you can surface to the user- It's very effective particularly to share the "Sparkline" / ASCII Art part showing in TEXT the graphical shape of the curve (e.g.,
|█▇▆▇ ▂▃ ▂ ▂|). This is very useful for humans for rapid visual feedback! Usecsv_to_sparkline.pyfrommonitoring-graphsto recreate it for arbitrary CSVs.
- It's very effective particularly to share the "Sparkline" / ASCII Art part showing in TEXT the graphical shape of the curve (e.g.,
scripts/setup-frontend-slo.sh: A bash script to automatically set up a 99.9% availability SLO using Log-based Metrics for a 'frontend' service. (Seescripts/README.mdfor full manual).
04 同仓库更多 Skills
safe-sre-investigator
🐉 Sets up and uses read-only Service Accounts for GCP and Kubernetes investigations using the principle of least privilege, and provides risk assessments for suggested commands. Use when asked to investigate GCP/GKE resources or suggest gcloud/kubectl commands.
pre-publish-checker
🐉 Thoroughly checks files for profanity, internal links, sensitive paths, and professionalism before publication. Use when preparing a codebase or extension for public release.
postmortem-generator
🐉 Creates a PostMortem given enough context about an incident/outage. Will guide user to timeline, action items/bugs, and finally draft a Google Doc with the results.
postmortem-aggregator
🐉 To be used when you have a folder containing N Post Mortem files. This will help crunch data and maintain/update a POMO_AGGREGATED.md file.
monitoring-graphs
🐉 Skill for generating high-quality, annotated incident graphs for post-mortems using Python. Use this when the user needs to visualize an outage, show error rates, or correlate metrics with incident milestones.
investigation-entrypoint
🐉 The primary entrypoint for investigating production outages, orchestrating SRE response, and mitigating incidents on Google Cloud Platform (GKE, Cloud Run, etc.). Start here when an incident occurs.