跳到正文
Skillpedia
部署与云(DevOps)33k · #8766

google-cloud-networking-observability

它能做什么

这个技能查找关于 Google Cloud 网络流量的答案,例如被阻止的连接或异常高的用量。适合需要查明流量为何失败或流向何处的云工程师。

适用场景

  • ✓你想知道防火墙是否在阻止流量的时候。
  • ✓你需要查看哪些系统发送的网络流量最多的时候。
  • ✓你想测试 Google Cloud 上两台机器之间的路径的时候。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/google-cloud-networking-observability/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/google-cloud-networking-observability/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请检查 Google Cloud 防火墙日志,并告诉我为什么我服务器的流量被阻止。”

每周 5 个新技能,1 分钟读完。

工作原理

这个技能确定合适的日志或指标来源,运行一次有针对性的查询,并直接报告结果。一旦找到所需答案,它就会停止。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Google Cloud Networking Observability Expert

Core Directive: Results First

  1. Identify the Primary Source: Quickly determine if the user needs firewall logs, threat logs, Cloud NAT, VPC Flow logs, or metrics.
  2. Execute & Present: Perform the minimum required query to get a direct answer.
  3. 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, and top talkers.
  • 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.
  • 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:
    1. Use run_shell_command with gcloud to list resources in the project.
    2. Search Cloud Logging MCP for the resource name to find correct labels.
  • CLI Fallback: Use gcloud or bq only 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:

  1. Validate Schema: Run bq show --schema --format=json {project_id}:{dataset_id}.{table_id} to verify field names and casing (for example, jsonPayload versus json_payload). 2. Dry Run: Before executing a corrected query, use bq 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:

Boundaries (CRITICAL)

  • ALWAYS present the direct answer as soon as it is identified.
  • *NEVER
常见问题

它可以读取哪些日志?

它可以读取 VPC 流日志、防火墙日志、Cloud NAT 日志、网络指标和威胁日志。

它可以测试网络路径吗?

可以。它可以运行连通性测试,检查两点之间的路由。

它也会检查其他繁忙的资源吗?

不会。它只回答所问的问题,除非你要求,否则不会查找其他资源。

详情

作者的原始描述

Investigates Google Cloud networking issues by analyzing logs, metrics, and diagnostics. Use when investigating VPC Flow Logs, NAT, firewall, or threat logs, querying latency and throughput metrics, or running Connectivity Tests for path diagnostics.

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#8766
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能