[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/compute/docs/instance-groups/monitor-instance-distribution [Back]  [Original]

Monitor instance distribution in MIGs  |  Compute Engine  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Monitor instance distribution in MIGs Stay organized with collections Save and categorize content based on your preferences.

This document describes the benefits, use cases, and procedures for monitoring virtual machine (VM) instance distribution in managed instance groups (MIGs). The procedures include how to view, customize, and query the GCE MIG Instance Distribution Monitoring dashboard in Cloud Monitoring.

When your MIG uses location flexibility to distribute instances across multiple zones, instance flexibility to specify multiple compatible machine types, or both, the MIG dynamically selects and provisions instances based on real-time resource availability. To observe this dynamic behavior at runtime across all your MIGs, you can use the GCE MIG Instance Distribution Monitoring dashboard. This preconfigured dashboard provides real-time visibility into how your instances are distributed across zones and machine types over time. The dashboard also shows you running (active) and not running (inactive) instances and the total instance count over the period. For example, you can interpret the dashboard metrics to diagnose capacity allocation, zonal balance, and fallback behavior.

Benefits of monitoring instance distribution in MIGs

When your MIG deploys instances across multiple zones in a regional group, or when you specify multiple machine types and ranks in an instance flexibility policy, the actual distribution of locations and machine types changes dynamically depending on the resource availability.

Monitoring your runtime instance distribution helps you do the following:

To learn more about how the monitoring dashboard helps with observability questions, see Interpret the dashboard in this document.

Monitor MIG instance distribution

You can monitor the instance distribution in a MIG by using one of the following ways:

About the monitoring dashboard

Cloud Monitoring provides preconfigured dashboards under the Google Services category. For MIGs, the GCE MIG Instance Distribution Monitoring dashboard provides the following four specialized charts:

Important: The GCE MIG Instance Distribution Monitoring dashboard is intended for observability, not for troubleshooting. To identify the underlying causes of creation failures or capacity constraints, instead see Troubleshooting resource availability errors.

By default, the dashboard aggregates data across all MIGs in your project. To view a single MIG, you can filter by MIGs (instance_group). If your project contains identically named MIGs in multiple locations, then apply a region (region) or zone (zone) filter to target a specific MIG.

Note: The GCE MIG Instance Distribution Monitoring dashboard is designed specifically for MIGs. You cannot use this dashboard to monitor location or instance flexibility of independent instances created using the bulkInsert method.

The charts in the GCE MIG Instance Distribution Monitoring dashboard rely on standard Compute Engine system metadata labels and metrics, such as compute.googleapis.com/instance/cpu/utilization and metadata.system_labels.machine_type. These system metrics and metadata labels are automatically collected by Cloud Monitoring for all Compute Engine instances. You don't need to install the Ops Agent or configure custom guest telemetry inside your instances to view the instance distribution, zone, machine type, or state charts in this dashboard.

Required roles

View and customize the dashboard

You can view the GCE MIG Instance Distribution Monitoring dashboard from the Google Cloud console, and then, optionally, copy and customize it to monitor specific regions, zones, or MIGs.

  1. To view the preconfigured GCE MIG Instance Distribution Monitoring dashboard, do the following:

    1. In the Google Cloud console, go to the Monitoring > Dashboards page.

      Go to Dashboards

    2. In the Filter, search for GCE MIG Instance Distribution Monitoring dashboard and select the dashboard. You can also find this dashboard in the Type menu > Google Services category.

    You can either use the dashboard as it is or copy to customize it further.

  2. Optional: To customize the dashboard, you must first copy it and then edit as follows:

    1. To copy, click Copy dashboard.

    2. Edit the copied dashboard and modify its name, charts, apply filters, and configure custom layout structures as required.

    You can view the copied or customized dashboard in the Type menu > Custom category.

For more information about customizing the dashboard, see the following pages in the Cloud Monitoring documentation:

Apply dashboard filters

The GCE MIG Instance Distribution Monitoring dashboard includes built-in filter variables that let you drill down into specific subsets of your MIG:

To apply a filter in the Google Cloud console, click the Filter button at the top of your copied dashboard, select the filter property (such as region, zone, or instance_group), and select the chosen values.

For more information on using filters, see Add temporary filters to a custom dashboard in the Cloud Monitoring documentation.

Configure event annotations

When analyzing changes in instance distribution across zones and machine types, configuring annotations for lifecycle events or deployments helps you correlate capacity shifts with specific operational activities. For example, you can add annotations to chart timelines to highlight events, such as the following:

For more information about available event types and how to add annotations, see the following pages in the Cloud Monitoring documentation:

Interpret the dashboard

When viewing your MIG instance distribution dashboard, use the following guidance to answer common observability questions and interpret dynamic location and machine type behavior.

Why are my instances running in specific zones or shifting across zones?

If the Instance distribution by zone chart indicates an uneven distribution across zones in a regional MIG or sudden capacity shifts across locations, check the following location flexibility factors:

Why is my MIG running on fallback machine types?

If your MIG uses instance flexibility and the Instance distribution by machine type chart shows that your group is actively creating and running instances on lower-preference (higher rank value) machine types instead of your primary selection, consider the following potential causes:

For more information, see How a MIG selects machine types.

Note: When a MIG shifts across zones or falls back to a lower-preference machine type due to capacity or quota constraints, this dynamic behavior is normal and intended. It doesn't indicate an application or configuration error. To investigate the exact reason for individual instance creation attempts or fallback triggers, inspect the MIG error logs or activity log entries. For more information about logs, see Compute Engine audit logging

Programmatically query using PromQL

To monitor the instance distribution in a MIG, you can also query the underlying metrics programmatically by using PromQL for Cloud Monitoring. Querying programmatically lets you integrate the instance distribution data into your custom observability dashboards or external monitoring tools, such as Grafana. You can use PromQL to query instances by zone, or by machine type.

Run the PromQL queries in the code editor as described in the following section.

Access the code editor

You can access PromQL from the following pages in the Google Cloud console:

To open the code editor when using Metrics Explorer, do the following:

  1. In the Google Cloud console, go to the  Metrics explorer page:

    Go to Metrics explorer

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. In the toolbar of the query-builder pane, select the  PromQL button.

  3. Type your query into the text field and click Run Query. The following sections provide example queries.

For more information about the code editor, see Use the code editor for PromQL in the Cloud Monitoring documentation.

Query active instances by zone

To query active instances by zone, run the following query in the code editor:

count by (zone) (compute_googleapis_com:instance_cpu_utilization{metadata_system_instance_group="YOUR_MIG_NAME"})

Replace YOUR_MIG_NAME with the name of your MIG.

Query active instances by machine type

To query active instances by machine type, run the following query in the code editor:

count by (metadata_system_machine_type) (compute_googleapis_com:instance_cpu_utilization{metadata_system_instance_group="YOUR_MIG_NAME"})

Replace YOUR_MIG_NAME with the name of your MIG.

What's next

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-12 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-12 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page