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:
-
To access and view Capacity Planner:
Capacity Planner Viewer (
roles/capacityplanner.viewer
)
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:
To export usage and forecast data of your compute instances, Persistent Disk volumes, GPUs, or TPUs for the past two years and for up to six months in the future, export data by resource type.
To export usage and forecast data of your machine types for a specific usage period, export data filtered by machine family or GPU type.
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:
In the Google Cloud console, go to the Capacity Planner page.
Optional: To change project, folder, or organization, in the project picker at the top of the page, select a project, folder, or organization.
To export a specific resource, select one of the following options:
Compute instances
Click the Virtual machine tab, if it isn't already selected.
For Machine family, choose the machine family to export. To export all, select All.
For Machine type, choose the machine type to export. To export all machine types within a machine family, select Select.
For Location, select the region or zone of the instances to export.
For Usage percentile, select a usage percentile.
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
Click the Disk tab.
For Disk type, choose the type of Persistent Disk to export.
For Location, select a region or zone.
For Usage percentile, select a usage percentile.
In the Usage and forecast by disk type graph, click
Export.A CSV file downloads to your workstation.
GPUs
Click the GPU tab.
For GPU type, choose the type of GPU to export. To export all, select All.
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.
For Usage percentile, select a usage percentile.
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
Click the TPU tab.
For TPU type, choose the type of TPU to export. To export all, select All.
For Usage percentile, select a usage percentile.
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:
In the Google Cloud console, go to the Capacity Planner page:
Optional: To change project, folder, or organization, in the project picker at the top of the page, select a project, folder, or organization.
To filter the usage data of your instances by machine family or GPU type, select one of the following options:
Compute instances
Click the Virtual machine tab, if it isn't already selected.
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.
For Location, select a region or zone.
For Usage percentile, select a usage percentile.
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.
For History start date, select the start date of the usage period.
For History end date, select the end date of the usage period.
Click
Export.
A CSV file downloads to your workstation.
GPUs
Click the GPU tab.
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.
For Location, select a region or zone.
For Usage percentile, select a usage percentile.
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.
For History start date, select the start date of the usage period.
For History end date, select the end date of the usage period.
Click
Export.
A CSV file downloads to your workstation.
What's next
- Learn how to audit logging information for Capacity Planner.