Export usage and forecast with the Google Cloud console

This document describes how to export usage and forecast data of the Compute Engine resources in your project, folder, or organization using the Google Cloud console.

You can export usage and forecast data for your virtual machine (VM) instances, Persistent Disk volumes, or GPUs as a CSV file. This is useful for viewing and analyzing your Compute Engine resources' data on your local workstation.

Before you begin

Required roles

To get the permissions that you need to export usage and forecast data of your Compute Engine resources, ask your administrator to grant you the following IAM roles on your project, folder, or organization:

For more information about granting roles, see Manage access to projects, folders, and organizations.

These predefined roles contain the permissions required to export usage and forecast data of your Compute Engine resources. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to export usage and forecast data of your Compute Engine resources:

  • To view the forecasted usage of your Compute Engine resources: capacityplanner.forecasts.list on the project, folder, or organization
  • To view the usage of your Compute Engine resources: capacityplanner.usageHistories.list on the project, folder, or organization
  • To summarize the usage of your Compute Engine resources: capacityplanner.usageHistories.summarize on the project, folder, or organization

You might also be able to get these permissions with custom roles or other predefined roles.

Export usage and forecast data

Based on the usage and forecast data of the Compute Engine resources within your project, folder, or organization that you want to export, use one of the following methods:

Export data for a Compute Engine resource type

You can export usage and forecast data of all your VMs, Persistent Disk volumes, or GPUs from the Usage and forecast graph.

To export usage and forecast data of all your VMs, Persistent Disk volumes, or GPUs, do the following:

  1. In the Google Cloud console, go to the Capacity Planner page.

    Go to Capacity Planner

  2. Optional: To change project, folder, or organization, in the project picker at the top of the page, select a project, folder, or organization.

  3. To select the Compute Engine resource to export, do one of the following:

    • To export the data of all your VMs, click the Virtual machine tab if it isn't already selected.

    • To export the data of all your Persistent Disk volumes, click the Disk tab.

    • To export the data of all your GPUs, click the GPU tab.

  4. In the Usage and forecast graph, click Export all.

    A CSV file downloads to your workstation.

Export data filtered by machine family or GPU type

You can export usage and forecast data of your VMs from the Usage and forecast by machine types table. Capacity Planner filters the exported data by your chosen machine family or GPU type in a specified location, and by percentile usage and forecasted usage.

To export usage and forecast data of your VMs filtered by machine family or GPU type, do the following:

  1. In the Google Cloud console, go to the Capacity Planner page:

    Go to Capacity Planner

  2. Optional: To change project, folder, or organization, in the project picker at the top of the page, select a project, folder, or organization.

  3. Select if you want to filter your VMs' usage data by machine family or GPU type:

    • To filter your VMs' usage data by machine family, do the following:

      1. Click the Virtual machine tab if it isn't already selected.

      2. For Machine family, select one of the following options:

        • To select a single machine family only, select one of the available machine families.

        • To select all machine families, select All.

          The Machine family list on the Capacity Planner page.

    • To filter your VMs' usage data by GPU type, do the following:

      1. Click the GPU tab.

      2. For GPU type, select one of the following options:

        • To select a single GPU type only, select one of the available GPU types.

        • To select all GPU types, select All.

          The GPU type list on the Capacity Planner page.

  4. For Location, select a region or zone.

  5. For Usage percentile, select an usage data percentile.

  6. For Forecast prediction interval, select a prediction interval.

  7. In the Usage and forecast by machine types table, do the following:

    1. Optional: For Usage month, select the month from which you want to export usage data of your VMs.

    2. Optional: For Forecast start date, select the start date of your forecast.

    3. Optional: For Forecast end date, select the end date of your forecast.

    4. Click Export.

    A CSV file downloads to your workstation.

What's next