All skills
google avatar

/google-cloud-networking-observability

@b6a171a
by googlegoogle/skills21k stars
1,698

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.

Use this Skill: https://skilld.dev/gh/google/skills/google-cloud-networking-observability

This session only. Nothing lands on disk.

referencescloud-nat-analysis.md

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

Cloud NAT Analysis Reference

Use Cloud NAT logs (compute.googleapis.com/nat_flows) to audit traffic going through NAT gateways or troubleshoot port exhaustion.

🤖 Agent / Gemini CLI Instructions (MCP)

You should use Cloud Logging MCP for exploratory analysis or BigQuery MCP for high-volume trends. Fallback to the CLI if the MCP tools are not available.

1. View Logs (Cloud Logging MCP)

Tool: list_log_entries

Filter:

resource.type="nat_gateway"
logName="projects/{project_id}/logs/compute.googleapis.com%2Fnat_flows"

Filter for dropped packets (potential port exhaustion):

jsonPayload.allocation_status="DROPPED"

2. Aggregate Trends (BigQuery MCP)

Tool: execute_sql_readonly

SQL Pattern:

SELECT
JSON_VALUE(json_payload.gateway_details.internal_ip) AS internal_ip, COUNT(*) AS
drop_count FROM `{project_id}.{dataset_id}._AllLogs` WHERE log_name LIKE
'%nat_flows%' AND JSON_VALUE(json_payload.allocation_status) = 'DROPPED' GROUP BY
1 ORDER BY drop_count DESC LIMIT 10

3. CLI Fallback

If MCP tools are unavailable, use the following gcloud and bq commands:

View Logs (gcloud)

gcloud logging read 'resource.type="nat_gateway" AND logName="projects/{project_id}/logs/compute.googleapis.com%2Fnat_flows"' --project {project_id} --limit 10 --format json --quiet

To filter for dropped packets:

gcloud logging read 'resource.type="nat_gateway" AND logName="projects/{project_id}/logs/compute.googleapis.com%2Fnat_flows" AND jsonPayload.allocation_status="DROPPED"' --project {project_id} --limit 10 --format json --quiet

Aggregate Trends (bq)

bq query --use_legacy_sql=false --project_id {project_id} '
SELECT
  JSON_VALUE(json_payload.gateway_details.internal_ip) AS internal_ip,
  COUNT(*) AS drop_count
FROM `{project_id}.{dataset_id}._AllLogs`
WHERE
  log_name LIKE "%nat_flows%"
  AND JSON_VALUE(json_payload.allocation_status) = "DROPPED"
GROUP BY 1
ORDER BY drop_count DESC
LIMIT 10
'

gcloud

To get the status of the router used by the NAT gateway:

gcloud compute
routers get-status {router_name} --region {region} --quiet

Key Fields

  • jsonPayload.gateway_details.external_ip / external_port: NAT exit point.
  • jsonPayload.gateway_details.internal_ip / internal_port: Source VM.
  • jsonPayload.allocation_status: DROPPED indicates failure to allocate a NAT port.

Scenarios

  • Audit Traffic: Link internal sources to external destinations.
  • Port Exhaustion: Use jsonPayload.allocation_status="DROPPED" to identify impacted VMs.

Source: SKILL.md on GitHub

No alertstoday3 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    This skill facilitates Google Cloud networking observability by interacting with official Google Cloud APIs and command-line tools. It contains patterns for executing cloud CLI commands and performing in-memory data processing, which are standard for its intended diagnostic and estimation purposes.

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: LOW · No issues

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

Last checked against GitHub yesterday.

Activeupdated 2 days ago
metadata
{
  "version": "1.0.3",
  "category": "Compute"
}

README badge

README badge for google/skills/google-cloud-networking-observability