compute-mig-autoscaling-troubleshooting
Diagnoses and resolves Google Compute Engine Managed Instance Group (MIG) autoscaling failures, scale-out blocks, and scale-in stalls.
Install / Use
npx skills add google/skills --skill compute-mig-autoscaling-troubleshootingInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Tags
Our assessment of compute-mig-autoscaling-troubleshooting
compute-mig-autoscaling-troubleshooting scores 90/100 on our quality scale, 274th of 751 Operations skills we index (top 37%).
Its SKILL.md is 28 KB long, well organised into 19 sections with 4 code examples: a thorough specification that gives an agent plenty to work with.
With 20,340 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so compute-mig-autoscaling-troubleshooting is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
compute-mig-autoscaling-troubleshooting compared with similar skills
All 4 of these similar skills score higher than compute-mig-autoscaling-troubleshooting; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| compute-mig-autoscaling-troubleshooting (this skill)by google | 90 | 20.3k | 2mo ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 2mo ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 2mo ago | SKILL.md |
| prospectingby coreyhaines31 | 100 | 62.2k | 5d ago | SKILL.md |
| ad-creativeby coreyhaines31 | 100 | 62.2k | 5d ago | SKILL.md |
Frequently asked questions
- How do I install compute-mig-autoscaling-troubleshooting?
- Run
npx skills add google/skills --skill compute-mig-autoscaling-troubleshooting. The install tabs above show the steps for each supported agent. - Which AI agents does compute-mig-autoscaling-troubleshooting work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is compute-mig-autoscaling-troubleshooting safe to use?
- It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is compute-mig-autoscaling-troubleshooting still maintained?
- The repository was last updated about 2 months ago, so compute-mig-autoscaling-troubleshooting is actively maintained.
Skill content
View source on GitHubname: compute-mig-autoscaling-troubleshooting description: >- Diagnoses and resolves Google Compute Engine Managed Instance Group (MIG) autoscaling failures, scale-out blocks, and scale-in stalls. Use ONLY when a Compute Engine MIG fails to add or remove VM instances during load changes, hits quota or zonal stockout limits, reaches maxNumReplicas (CAPPED_AT_MAX_NUM_REPLICAS), conflicts with HTTP(S) load balancer maxRate settings, fails to scale in to zero instances, or fails to read Cloud Monitoring scaling metrics. DO NOT read or use for Google Kubernetes Engine (GKE) Horizontal Pod Autoscaler (HPA), GKE Cluster Autoscaler, standalone single-VM creation, or single-VM host maintenance reboots. metadata: version: "1.0.0" category: Compute
Compute Engine Managed Instance Group (MIG) Autoscaling Troubleshooting
This skill diagnoses and resolves autoscaling failures in Google Compute Engine
Managed Instance Groups (MIGs). It isolates root causes across
Project Quotas vs. Physical Zonal Stockouts, Autoscaler Policy Limits
(maxNumReplicas, minNumReplicas: 0 scale-to-zero rules, scaleInControl,
mode, --cool-down-period, Load Balancer UTILIZATION vs. RATE), and
Cloud Monitoring Metric / Service Agent IAM Availability.
MCP Tools:
get_instance_group_manager_basic_info,list_instance_group_managers,list_managed_instances,list_instance_templates,get_instance_template_basic_info,get_instance_template_properties
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, project, IAM, or MIG modifications (installing gcloud, configuring
MCP, enabling APIs or Log Analytics, adding IAM bindings, updating autoscalers
or backend services, or deleting resources) must be explicitly approved by the
user before execution.
- Google Cloud SDK: Verify
gcloudis installed (gcloud --version). If missing or outdated, seek user approval before installing via Install the gcloud CLI. - Compute Engine MCP Server & Capability Boundary:
- The Compute Engine MCP server
(Use the Compute Engine MCP server)
exposes read-only zonal MIG and template discovery tools
(
get_instance_group_manager_basic_info,list_instance_group_managers,list_managed_instances,list_instance_templates,get_instance_template_basic_info,get_instance_template_properties) and requiresroles/mcp.toolUser. - Critical Routing Rule:
get_instance_group_manager_basic_inforequires a singlezone(no regional MIG RPCs exist in Compute Engine MCP) and returnsInstanceGroupManagerBasicInfo(name,id,instance_template,target_size,status), which omitsautoscaler.status,autoscaler.statusDetails,autoscaler.recommendedSize, andautoscaler.autoscalingPolicy. Compute Engine MCP also lackslist-errors, Cloud Logging/Monitoring queries, andupdate-autoscaling/set-autoscalingmutations. Always route regional MIG inspection,autoscaler.*diagnostics,list-errors, Cloud Logging/Monitoring queries, and autoscaling mutations togcloud(or Compute Engine / Monitoring / Logging REST APIs).
- The Compute Engine MCP server
(Use the Compute Engine MCP server)
exposes read-only zonal MIG and template discovery tools
(
- Authentication: Local CLI (
gcloud auth login), Application Default Credentials (gcloud auth application-default login), or Service Accounts (GOOGLE_APPLICATION_CREDENTIALS). - Project, Region, Billing & API Enablement:
Note: An active billing account attachment is required (even when using Free Tier eligible resources). Default to a well-supported region such asgcloud config set project {project_id} gcloud config set compute/region {region} gcloud config set compute/zone {zone} gcloud services enable compute.googleapis.com logging.googleapis.com monitoring.googleapis.comus-central1if unspecified, and consult Google Cloud locations to verify regional and zonal machine family availability. - Required IAM Roles:
- Human Caller / Agent Roles:
roles/compute.viewer,roles/logging.viewer(plusroles/logging.viewAccessorfor Log Analytics, androles/bigquery.jobUser+roles/bigquery.dataViewerfor linked BigQuery datasets), androles/monitoring.viewerfor read-only diagnostics;roles/compute.instanceAdmin.v1(plusroles/iam.serviceAccountUserwhen updating templates with a VM service account,roles/compute.loadBalancerAdminfor Backend Service updates, androles/resourcemanager.projectIamAdminto repair project IAM bindings) for remediation; androles/mcp.toolUserfor Compute Engine MCP calls. - Google-Managed Service Agents (Project-Level):
- Compute Engine Service Agent
(
service-{project_number}@compute-system.iam.gserviceaccount.com): requiresroles/compute.serviceAgent(includes Cloud Monitoring metric read permissions). - Google APIs Service Agent
(
{project_number}@cloudservices.gserviceaccount.com): requiresroles/compute.instanceGroupManagerServiceAgent(creates and deletes MIG member VMs).
- Compute Engine Service Agent
(
- Human Caller / Agent Roles:
Step 1: Identify Problem Scope & Inspect Autoscaler Status
A. Inspect Live MIG Stability, Autoscaler Status & Per-VM Actuation Errors
Inspect status.isStable, autoscaler.status, autoscaler.statusDetails,
autoscaler.recommendedSize, autoscaler.autoscalingPolicy, and targetSize
via gcloud compute instance-groups managed describe (pass --region={region}
for Regional MIGs or --zone={zone} for Zonal MIGs), and run gcloud compute instance-groups managed list-errors to surface asynchronous VM creation errors:
# 1. Inspect Autoscaler status, statusDetails, recommendedSize, and policy (Regional MIG):
gcloud compute instance-groups managed describe {mig_name} --project={project_id} --region={region} \
--format="yaml(name, targetSize, status.isStable, autoscaler.status, autoscaler.statusDetails, autoscaler.recommendedSize, autoscaler.autoscalingPolicy)"
# (For a Zonal MIG, replace --region={region} with --zone={zone}:)
gcloud compute instance-groups managed describe {mig_name} --project={project_id} --zone={zone} \
--format="yaml(name, targetSize, status.isStable, autoscaler.status, autoscaler.statusDetails, autoscaler.recommendedSize, autoscaler.autoscalingPolicy)"
# 2. Inspect per-instance actuation errors logged by the MIG controller:
gcloud compute instance-groups managed list-errors {mig_name} --project={project_id} --region={region} --limit=25
Authoritative autoscaler.statusDetails[] (type & message) Values &
Root Causes (see
Understanding autoscaler decisions):
Each item in autoscaler.statusDetails[] on the REST Autoscaler resource
contains a structured type enum and a human-readable message string:
CAPPED_AT_MAX_NUM_REPLICAS("The number of instances has reached themaxNumReplicas. The autoscaler cannot add more instances."): Current target size has hit the configuredautoscalingPolicy.maxNumReplicasceiling while demand warrants more VMs.NOT_ENOUGH_QUOTA_AVAILABLE/QUOTA_EXCEEDED("Quota for someresources is exceeded. Increase the quota or delete resources to free upmore quota.", paired withQUOTA_EXCEEDEDinlist-errorsand Cloud Audit Logs): Project or regional quota (CPUS,IN_USE_ADDRESSES,SSD_TOTAL_GB, or GPUs) is exhausted.ZONE_RESOURCE_STOCKOUT/REGION_RESOURCE_STOCKOUT(paired withZONE_RESOURCE_POOL_EXHAUSTEDorZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILSinlist-errorsand Cloud Audit Logs): Temporary physical hardware shortage in the target zone or region.MISSING_CUSTOM_METRIC_DATA_POINTS/CUSTOM_METRIC_INVALID/CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE("The monitoring metric that wasspecified does not exist or does not have the required labels. Check themetric."): The autoscaler cannot read valid 60-second data points from the configured Cloud Monitoring metric, orservice-{project_number}@compute-system.iam.gserviceaccount.comlacksroles/compute.serviceAgent.UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION("Autoscaling doesnot work with an HTTP/S load balancer configured for maxRate."),BACKEND_SERVICE_DOES_NOT_EXIST,MORE_THAN_ONE_BACKEND_SERVICE, orMISSING_LOAD_BALANCING_DATA_POINTS: Load-balancing autoscaling conflicts with a Backend Service configured inRATE(maxRate) balancing mode instead ofUTILIZATION, references a deleted/multiple backend services, or receives no traffic.ALL_INSTANCES_UNHEALTHY("All instances in the instance group areunhealthy (not in RUNNING state). If this is an error, check theinstances."): All MIG instances are not inRUNNINGstate, halting load-based scaling decisions until instances recover.MODE_ONLY_SCALE_OUT/MODE_ONLY_UP/MODE_OFF/MIN_EQUALS_MAX/SCALING_SCHEDULE_AFFECTING_MIN_REPLICAS/WARNING_NO_INSTANCES: Policy mode or schedule constraints actively restricting scale-in or scale-out.
B. Query Cloud Audit Logs for Autoscaler Decisions & Instance Creation Failures
Query Cloud Audit Logs across autoscaler, gce_autoscaler,
gce_instance_group_manager, gce_instance_group, and gce_instance (passing
--freshness=7d because gcloud logging read defaults to 1d). See
Viewing autoscaler logs:
- Autoscaler
system_eventAudit Log Schemas (protoPayload.metadata):- Resize decisions (
compute.autoscalers.resize,@type:"type.googleapis.com/autoscaler.AutoscalerSizeChangeExplanation"): RecordsprotoPayload.metadata.oldSize,protoPayload.metadata.newSize,protoPayload.metadata.autoscalingMode,protoPayload.metadata.autoscalingReason.summary,protoPayload.metadata.autoscalingReason.scalingSignal(name,calculatedSize,calculationDetails.servingSize,calculationDetails.signalTarget,calculationDetails.signalValue), andprotoPayload.metadata.autoscalingReason.scalingLimit(name,limitSize,limitPolicy, e.g.,MAX_REPLICAS_LIMITorSCALE_IN_LIMIT). - Status transitions (
compute.autoscalers.changeStatus,@type: "type.googleapis.com/autoscaler.AutoscalerStatusChange"): Records human-readable status message transitions inprotoPayload.metadata.oldStatus.detailsandprotoPayload.metadata.newStatus.details(for example, transitioning from"OK"to"Quota for some resources is exceeded. Increase the quota ordelete resources to free up more quota.";statusDetails[].typeenum codes live on the RESTAutoscalerresource rather than insidechangeStatuslog entries).
- Resize decisions (
# 1. Query failed MIG resize, autoscaler, and VM insertion Admin Activity logs (projecting errors[0].code):
gcloud logging read '(resource.type="autoscaler" OR resource.type="gce_autoscaler" OR resource.type="gce_instance_group_manager" OR resource.type="gce_instance_group" OR resource.type="gce_instance") AND severity>=ERROR AND protoPayload.methodName=~"compute\.(regionInstanceGroupManagers|instanceGroupManagers|instances|instanceGroups|autoscalers|regionAutoscalers)\.(resize|insert|addInstances|removeInstances|changeStatus|update|patch)" AND protoPayload.resourceName:"{mig_name}"' \
--project={pro
Truncated for display — read the full file on GitHub.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
prospecting
62.2kWhen the user wants to find and qualify prospects for outbound, or asks who to target first, which signal to prioritize, or where to spot buyers with the problem: buying signals, enrichment, verification, account research.
ad-creative
62.2kWhen the user wants to write or judge ad creative, or asks which ad, hook, or angle to run or kill: headlines, primary text, and variations for Google, Meta, LinkedIn, and TikTok, fresh angles when creative fatigues. Test hypotheses name the metric, comparison, and expected direction.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
