This document describes how to export the actual and forecasted usage data of the following Compute Engine resources:
Virtual machine (VM) instances, including vCPUs, RAM, and Local SSD disks attached to your VMs.
Persistent Disk volumes, whether they're attached to VMs or not.
GPUs, whether they're attached to VMs or not.
Capacity Planner exports the usage data of your Compute Engine resources as a CSV file, which is useful for viewing and editing the usage data on your local workstation.
Before you begin
If you can't access Capacity Planner in the Google Cloud console, then your project, folder, or organization might not be eligible to access and use Capacity Planner. To enable your project, folder, or organization to access and use Capacity Planner, contact your Technical Account Manager or the Sales team.
If you haven't already, then see how Capacity Planner works.
Required roles
To get the permissions that you need to export the actual and forecasted usage data of your Compute Engine 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.
These predefined roles contain the permissions required to export the actual and forecasted usage 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 the actual and forecasted usage 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 actual usage of your Compute Engine resources:
capacityplanner.usageHistories.list
on the project, folder, or organization -
To summarize the actual 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 actual and forecasted usage data
To export the actual and forecasted usage data of the Compute Engine resources within your project, folder, or organization, select one of the following methods:
Export usage data for all Compute Engine resources
You can export the actual and forecasted usage data of all VMs, Persistent Disk volumes, or GPUs within your project, folder, or organization. The usage data of your Compute Engine resources is available for up to two years in the past.
To export the actual and forecasted usage data of all your VMs, Persistent Disk volumes, or GPUs, 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 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's not 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.
In the Usage and forecast graph, click
Export all.A CSV file downloads to your workstation.
Export usage data by machine family or GPU model
You can export the actual and forecasted usage data of your VMs as displayed in the Usage and forecast by machine types table. The exported data is organized by your chosen machine family or GPU model, and by your chosen location, percentile usage, and forecasted usage.
To export the actual and forecasted usage data of your VMs by machine family or GPU model, 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.
Select if you want to filter your VMs' usage data by machine faimily or GPU model:
To filter the usage data of your VMs by machine family, do the following:
Retain the default tab, Virtual machine.
In the Machine family list, 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.
To filter the usage data of your VMs by GPU model, do the following:
Click the GPU tab.
In the GPU type list, select one of the following options:
To select a single GPU model only, select one of the available GPU models.
To select all GPU models, select All.
In the Location list, select a region or zone.
In the Usage percentile list, select an usage data percentile.
In the Forecast prediction interval list, select a prediction interval.
In the Usage and forecast by machine types table, do the following:
Optional: In the Usage month list, select the month from which you want to export the actual usage data of your VMs.
Optional: In the Forecast start date list, select the start date of your forecast.
Optional: In the Forecast end date list, select the end date of your forecast.
Click
Export.
A CSV file downloads to your workstation.
What's next
- Learn how to audit logging information for Capacity Planner.