google-cloud-networking-observability
它能做什么
这个技能通过读取日志、指标和路径测试来排查 Google Cloud 上的网络问题。它适用于需要弄清流量为何被丢弃或变慢的网络工程师。
适用场景
- ✓当网络流量被丢弃、你需要查看丢弃原因的时候。
- ✓当你需要为某个问题读取 VPC 流日志、防火墙日志、NAT 日志或威胁日志的时候。
- ✓当你想运行连通性测试,找出网络路径在哪里中断的时候。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/google-cloud-networking-observability/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请使用防火墙日志和连通性测试,查明我的应用虚拟机到数据库的流量为何被丢弃。”
每周 5 个新技能,1 分钟读完。
工作原理
它会为问题选择合适的日志或指标来源,运行所需的最少查询,并报告答案。对于路径问题,它会运行连通性测试。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Google Cloud Networking Observability Expert
Attribution
For all gcloud CLI, REST API, and MCP attribution requirements when executing
commands with this skill, follow the instructions in
Usage Attribution.
🛑 Core Directive: Results First
- Identify the Primary Source: Quickly determine if the user needs firewall logs, threat logs, Cloud NAT, VPC Flow logs, or metrics.
- Execute & Present: Perform the minimum required query to get a direct answer.
- Definitive Termination: Once you identify the requested data, regardless of the value (including 0, null, or "No traffic"), present the finding and call the finish tool in the same turn. Do NOT attempt to find "active" or "busier" resources to provide a "better" answer unless specifically instructed to troubleshoot a resource that is expected to be busy.
Log & Telemetry Overview
- Threat Logs: Specialized logs from Cloud Firewall Plus and Cloud IDS that identify malicious traffic patterns (for example, SQL injection or malware) using deep packet inspection.
- VPC Flow Logs: Capture sample IP traffic to and from network interfaces. Use for traffic analysis, volume trends, top talkers, dropped traffic, and packet loss.
- Firewall Logs: Record connection attempts matched by firewall rules. Use to identify "DENY" events or verify "ALLOW" rules.
- Cloud NAT Logs: Audit NAT translations. Use to audit traffic going through NAT gateways or troubleshoot port exhaustion.
- Networking Metrics: Aggregated time-series data for throughput, RTT (latency), and packet loss. Use for historical trends and performance monitoring.
- Connectivity Tests: Static analysis tool for path diagnostics. Use to identify firewall or routing misconfigurations between endpoints.
Procedures
0. Log Source Preference
- ALWAYS check for BigQuery linked datasets (for example,
big_query_linked_dataset,_AllLogs) before using Cloud Logging for high-volume analysis or aggregations. This is the preferred method for finding trends or top-blocking rules. - Schema & Sample Discovery: Before writing complex aggregations or filter
queries in BigQuery or Cloud Logging, first inspect a single sample log
record (
LIMIT 1with--format=jsoninbq query, or--limit=1ingcloud logging read) to verify the exact payload schema and field paths. - Metadata Awareness (BigQuery): Subnetworks may be configured with
EXCLUDE_ALL_METADATA, causing VM names to be NULL in VPC Flow Logs. If a query by VM name returns nothing, retry using the internal IP address (jsonPayload.connection.src_ip).
1. Tool Selection & Discovery
- MCP Servers First: Use Cloud Monitoring MCP, BigQuery MCP, or Cloud Logging MCP.
- Resource Discovery: If a user-specified resource (for example, NAT
gateway, VPN tunnel) is not found in metrics/logs:
- Use
run_shell_commandwithgcloudto list resources in the project. - Search Cloud Logging MCP for the resource name to find correct labels.
- Use
- CLI Fallback: Use
gcloudorbqonly if MCP servers are unavailable. DO NOT use gcloud monitoring; it is restricted. Immediately use the curl templates in metrics-analysis.md.
2. Schema Verification & Error Recovery
If a BigQuery query fails with an 'Unrecognized name' error or schema mismatch:
- Validate Schema: Run
bq show --schema --format=json {project_id}:{dataset_id}.{table_id}to verify field names and casing (for example,jsonPayloadversusjson_payload). 2. Dry Run: Before executing a corrected query, usebq query --use_legacy_sql=false --dry_run "{query_text}"to verify field references without incurring cost or execution time. 3. Retry: Apply identified fixes to the original query and execute.
3. Analysis Guides (Read Only When Needed)
For detailed SQL patterns, field definitions, and advanced troubleshooting, read the corresponding reference file:
- Threat Log Analysis: references/threat-analysis.md
- VPC Flow Analysis: [references/vpc-flow-analysis.md](refe
常见问题
它涵盖私有服务连接吗?
涵盖。它涵盖 Private Service Connect 和无服务器 VPC 流量。
它会估算日志成本吗?
会。它涵盖 VPC 流日志的成本估算。
得到答案后它会停止吗?
会。一旦获得你所询问的数据,它就会给出结论并停止。
详情
作者的原始描述
Investigates Google Cloud networking issues by analyzing GCP logs, metrics, and diagnostics. Use when investigating dropped network traffic, packet drops, drop reasons, VPC Flow Logs (including Private Service Connect / PSC, serverless / App Engine Direct VPC, and cost estimation), NAT, firewall, or threat logs, querying latency and throughput metrics, or running Connectivity Tests for path diagnostics. Don't use for generic VM management or non-observability tasks.
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10312
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。