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
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.
If you haven't already, then see how Capacity Planner works.
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:
-
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 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:
To export usage and forecast data of all your VMs, Persistent Disk volumes, or GPUs, export data for a Compute Engine resource type.
To export usage and forecast data of VMs with a specific machine family or GPU type in a specific location, export data filtered by machine family or GPU type.
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:
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 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.
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:
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 family or GPU type:
To filter your VMs' usage data by machine family, do the following:
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.
To filter your VMs' usage data by GPU type, do the following:
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 an usage data percentile.
For Forecast prediction interval, select a prediction interval.
In the Usage and forecast by machine types table, do the following:
Optional: For Usage month, select the month from which you want to export usage data of your VMs.
Optional: For Forecast start date, select the start date of your forecast.
Optional: For Forecast end date, 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.