Export data to your local workstation

This document explains how to export a CSV file containing the usage and forecast data of your resources in your project, folder, or organization. To export this data to a different Google Cloud product, see instead Export data to a Cloud Storage bucket or BigQuery table.

You can export usage and forecast data as a CSV file for the following resources:

  • Compute Engine instances

  • Persistent Disk volumes

  • GPUs

  • TPUs

This action helps you view and analyze the usage data of your resources on your local workstation.

Before you begin

  • If you can't access Capacity Planner in the Google Cloud console, then your organization might not be eligible to access and use Capacity Planner. To request access, contact your Technical Account Manager (TAM) or the Sales team.

Required roles

To get the permissions that you need to export usage and forecast data of your 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 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 resources:

  • To view forecasted usage data: capacityplanner.forecasts.list on the project, folder, or organization
  • To view historical usage data: capacityplanner.usageHistories.list on the project, folder, or organization
  • To summarize the usage of your 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 resources within your project, folder, or organization that you want to export, use one of the following methods:

Export data by resource type

You can export usage and forecast data about your compute instances, Persistent Disk volumes, GPUs, or TPUs from the Usage and forecast by resource type graph. You can export usage data from within two years in the past, and forecast data for up to six months in the future. To export data, first select the tab for the resource that you want to export, and then filter the data by the following:

  • Resource type

  • Region or zone

  • Usage percentile

To export usage and forecast data about your instances, Persistent Disk volumes, GPUs, or TPUs, 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 export a specific resource, select one of the following options:

    Compute instances

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

    2. For Machine family, choose the machine family to export. To export all, select All.

    3. For Machine type, choose the machine type to export. To export all machine types within a machine family, select Select.

    4. For Location, select the region or zone of the instances to export.

    5. For Usage percentile, select a usage percentile.

    6. In the Usage and forecast by machine family or Usage and forecast by machine types graph, click Export.

      A CSV file downloads to your workstation.

    Persistent Disks

    1. Click the Disk tab.

    2. For Disk type, choose the type of Persistent Disk to export.

    3. For Location, select a region or zone.

    4. For Usage percentile, select a usage percentile.

    5. In the Usage and forecast by disk type graph, click Export.

      A CSV file downloads to your workstation.

    GPUs

    1. Click the GPU tab.

    2. For GPU type, choose the type of GPU to export. To export all, select All.

    3. For Machine type, choose the machine type that have your chosen GPU attached to export. To export all machine types that have a specific GPU type attached, select Select.

    4. For Usage percentile, select a usage percentile.

    5. In the Usage and forecast by GPU type or Usage and forecast by machine types graph, click Export.

      A CSV file downloads to your workstation.

    TPUs

    1. Click the TPU tab.

    2. For TPU type, choose the type of TPU to export. To export all, select All.

    3. For Usage percentile, select a usage percentile.

    4. In the Usage and forecast by TPU type or Usage and forecast by machine types graph, click Export.

      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 instances from the Usage and forecast by machine types table. To export data, first select the resource that you want to export, and filter the data by the following:

  • Compute instances, CPU cores, or GPUs

  • Region or zone

  • Usage percentile

To export usage and forecast data of your instances 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. To filter the usage data of your instances by machine family or GPU type, select one of the following options:

    Compute instances

    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.

    3. For Location, select a region or zone.

    4. For Usage percentile, select a usage percentile.

    5. In the Usage and forecast by machine types table, for View data for, select one of the following options:

      • To view usage and forecast by instances, select VM.

      • To view usage and forecast by CPU cores, select Cores.

    6. For History start date, select the start date of the usage period.

    7. For History end date, select the end date of the usage period.

    8. Click Export.

    A CSV file downloads to your workstation.

    GPUs

    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.

    3. For Location, select a region or zone.

    4. For Usage percentile, select a usage percentile.

    5. In the Usage and forecast by machine types table, for View data for, select one of the following options:

      • To view usage and forecast by instances, select VM.

      • To view usage and forecast by GPUs, select GPU.

    6. For History start date, select the start date of the usage period.

    7. For History end date, select the end date of the usage period.

    8. Click Export.

    A CSV file downloads to your workstation.

What's next