All skills
davila7 avatar

/google-cloud-networking-observability

@82b0fb3

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.

Use this Skill: https://skilld.dev/gh/davila7/claude-code-templates/google-cloud-networking-observability

This session only. Nothing lands on disk.

referencesmetrics-analysis.md

≈770 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Networking Metrics Reference

Common Troubleshooting Metrics

  • RTT (Latency): networking.googleapis.com/cloud_netslo/active_probing/rtt
  • Packet Loss: networking.googleapis.com/cloud_netslo/active_probing/probe_count
  • VM Throughput: compute.googleapis.com/instance/network/received_bytes_count
  • VM Sent Packets: compute.googleapis.com/instance/network/sent_packets_count
  • VM Received Packets: compute.googleapis.com/instance/network/received_packets_count
  • NAT Port Exhaustion: compute.googleapis.com/nat/dropped_sent_packets_count
  • NAT Sent Packets: compute.googleapis.com/nat/sent_packets_count
  • VPN Dropped Received Packets: vpn.googleapis.com/network/dropped_received_packets_count
  • VPN Dropped Sent Packets: vpn.googleapis.com/network/dropped_sent_packets_count
  • Internal Latency (RTT): networking.googleapis.com/vm_flow/rtt. Measures internal VM-to-VM traffic within Google Cloud.
  • External Latency (RTT): networking.googleapis.com/vm_flow/external_rtt. Measures traffic to and from the internet.

Distribution Parsing Standard

When querying metrics of type DISTRIBUTION (like RTT), align the data with ALIGN_PERCENTILE_50 to ensure the output can be parsed as a simple numeric value.

Dynamic Discovery

  • Primary (Cloud Monitoring MCP): Use list_metric_descriptors with a filter.

    • Prefix: Filter by prefix, using starts_with(). Common prefixes:
      • metric.type = starts_with("networking.googleapis.com/")
      • metric.type = starts_with("router.googleapis.com/")
      • metric.type = starts_with("vpn.googleapis.com/")
      • metric.type = starts_with("compute.googleapis.com/")
    • Substring: metric.type = has_substring("network") OR metric.type = has_substring("packet") OR metric.type = has_substring("nat")
  • Fallback (CLI/CURL): If MCP tools not available, use gcloud or curl.

    curl -s -H "Authorization: Bearer $(gcloud auth print-access-token)"
    "https://monitoring.googleapis.com/v3/projects/{project_id}/metricDescriptors?filter=metric.type=starts_with(%22{prefix}%22)"
    | jq -r '.metricDescriptors[] | "\(.type): \(.description)"'
    
    curl -s -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    "https://monitoring.googleapis.com/v3/projects/{project_id}/timeSeries?" \
    "filter=metric.type%3D%22{metric_name}%22&" \
    "interval.startTime={start_time}&" \
    "interval.endTime={end_time}&" \
    "aggregation.alignmentPeriod=3600s&" \
    "aggregation.perSeriesAligner=ALIGN_PERCENTILE_50" \
    | jq '.timeSeries[] | {metric: .metric.type, points: .points[:5]}'
  • Detailed Schema: ALWAYS query the full descriptor for a specific metric before use to identify available labels. Metric types like vm_flow/rtt often use resource.labels.zone for the local zone and metric.labels.remote_zone for the peer.

Source: SKILL.md on GitHub

1 warning2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill is a diagnostic tool designed for Google Cloud networking observability. It provides structured procedures for querying logs, metrics, and connectivity diagnostics using official Google Cloud tools (gcloud, bq, and MCP servers). It follows security best practices by explicitly forbidding the creation of local scripts and requiring the cleanup of diagnostic resources.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 82b0fb3. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 16 hours ago.

Activeupdated 5 months ago
source
google/skills (Apache 2.0)

README badge

README badge for davila7/claude-code-templates/google-cloud-networking-observability