Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

compute-host-events-troubleshooting

БесплатноБез исполняемых скриптовНе проверен

Investigates, diagnoses, and mitigates Google Compute Engine virtual machine (VM) host events, including planned infrastructure maintenance…

googleот google★ 25 380 звёзд на GitHub

Об этом скилле

Compute Engine VM Host Events & Infrastructure Crash Troubleshooting

This skill diagnoses unexpected Google Compute Engine VM restarts, terminations, and unresponsiveness caused by infrastructure host events (compute.instances.hostError, compute.instances.migrateOnHostMaintenance, compute.instances.terminateOnHostMaintenance, compute.instances.preempted, compute.instances.automaticRestart) or guest-OS-initiated shutdowns (compute.instances.guestTerminate). It provides authoritative Cloud Audit Log queries, Log Analytics _Required._AllLogs SQL aggregations, upcoming maintenance window checks, and host scheduling remediations.

MCP Tools: get_instance_basic_info, list_instances, list_instance_attached_disks, start_instance, stop_instance, reset_instance, delete_instance, get_zone_operation

Usage Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.


Prerequisites & Environment Setup

Any host or project modifications (installing or updating gcloud, configuring the Compute Engine MCP server, enabling APIs or Log Analytics, mutating VM scheduling/metadata, creating log-based metrics, or deleting resources) must be explicitly approved by the user before execution.

  1. Google Cloud SDK: Verify gcloud is installed (gcloud --version). If missing or outdated, ask the user for approval before installing via Install the gcloud CLI.
  2. Compute Engine MCP Server & Capability Boundary:
    • The Compute Engine MCP server (Use the Compute Engine MCP server) exposes zonal VM discovery and lifecycle tools (get_instance_basic_info, list_instances, list_instance_attached_disks, start_instance, stop_instance, reset_instance, delete_instance, get_zone_operation, requiring roles/mcp.toolUser).
    • Critical Routing Rule: get_instance_basic_info returns a reduced InstanceBasicInfo projection (name, id, status, machine_type, create_time, guest_accelerators) that omits scheduling and resourceStatus.upcomingMaintenance, and Compute Engine MCP does not expose tools for Cloud Logging queries, serial console output, set-scheduling, perform-maintenance, or instance metadata updates. Always route full scheduling inspection, upcoming maintenance checks, serial port output, audit log queries, and scheduling/metadata mutations to gcloud (or Compute Engine / Cloud Logging REST APIs).
  3. Authentication:
    • Local CLI: gcloud auth login
    • Application Default Credentials: gcloud auth application-default login
    • Service Accounts: Set GOOGLE_APPLICATION_CREDENTIALS to your service account credentials path.
  4. Project, Region & Billing:
    gcloud config set project {project_id}
    gcloud config set compute/region {region}
    gcloud config set compute/zone {zone}
    
    Note: An active billing account attachment is required (even when evaluating Free Tier eligible resources). If no region is specified, default to us-central1 (us-central1-a), and check Google Cloud locations for regional hardware availability.
  5. API Enablement:
    gcloud services enable compute.googleapis.com logging.googleapis.com monitoring.googleapis.com
    
  6. Required IAM Roles:
    • Read-Only Diagnostics: roles/compute.viewer (instance scheduling and serial console output), roles/logging.viewer (or roles/logging.privateLogViewer to read system_event and activity audit logs), and roles/logging.viewAccessor for Log Analytics queries in Cloud Logging (plus roles/bigquery.jobUser and roles/bigquery.dataViewer when querying a linked Log Analytics dataset from BigQuery Studio or bq).
    • Remediation & MCP: roles/compute.instanceAdmin.v1 (to run set-scheduling, perform-maintenance, add-metadata, or remove-metadata), roles/logging.configWriter (to create log-based metrics), and roles/mcp.toolUser (for Compute Engine MCP calls).

Diagnostic Workflow: Classify the Termination Event

When a user reports an unexpected VM reboot, stop, or crash, run targeted Cloud Logging queries against cloudaudit.googleapis.com/system_event (Compute Engine infrastructure events) and cloudaudit.googleapis.com/activity (caller-initiated API stops/resets). Always pass --freshness=7d (or a window covering the incident timestamp) because gcloud logging read defaults --freshness to 1d and silently returns zero rows for incidents older than 24 hours. See [Troubleshooting VM shutdowns and reboots](https://docs.cloud.google.com/compute/docs/tr

Полный SKILL.md на GitHub

Установить compute-host-events-troubleshooting в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/attribution.md

FAQ

Что делает скилл compute-host-events-troubleshooting?

Investigates, diagnoses, and mitigates Google Compute Engine virtual machine (VM) host events, including planned infrastructure maintenance (migrateOnHostMaintenance, terminateOnHostMaintenance), physical host hardware errors (hostError), guest OS terminations (guestTerminate), and Spot or Preemptible VM preemptions (compute.instances.preempted) using shutdown-script metadata. Use ONLY when an existing Compute Engine VM unexpectedly reboots, stops, crashes, is preempted, or becomes unresponsive due to physical host maintenance, hardware errors, or Local SSD recovery. DO NOT read or use for creating new standalone VMs, Managed Instance Group (MIG) autoscaler scale-out or scale-in failures, Google Kubernetes Engine (GKE) clusters, application OOM debugging, or VPC firewall issues.

Как установить скилл compute-host-events-troubleshooting?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл compute-host-events-troubleshooting запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить compute-host-events-troubleshooting с