This document describes how to use Capacity Planner to export the actual and forecasted usage data of the following Compute Engine resources in your project or organization:
The virtual machine (VM) instances, including the vCPUs, RAM, and Local SSD disks attached to your VMs.
The persistent disks, whether they're attached to VMs or not.
The actual and forecasted usage data of your resources is exported as a CSV file. Exporting usage data is useful to view and edit the usage data of your Compute Engine resources on your local workstation.
Before you begin
If you can't access Capacity Planner in the Google Cloud console, your project or organization might not be eligible to access and use Capacity Planner. To enable your project or organization to use Capacity Planner, contact your Technical Account Manager or the Sales team.
If you haven't already, review 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:
-
To access and view Capacity Planner:
Capacity Planner Viewer (
roles/capacityplanner.viewer
) on the project or organization
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 VMs or persistent disks:
capacityplanner.forecasts.list
on the project or organization -
To view the actual usage of your VMs or persistent disks:
capacityplanner.usageHistories.list
on the project or organization -
To summarize the actual usage of your VMs or persistent disks:
capacityplanner.usageHistories.summarize
on the project 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 a selected Compute Engine resource in your project or organization, select one of the following methods described in this document:
Export the usage data of all your VMs
You can export the actual and forecasted usage data of all the VMs in your project or organization. In the exported CSV file, the VMs are organized by machine family, location, percentile usage, and forecasted usage.
To export the actual and forecasted usage data of all the VMs in your project or organization using the Google Cloud console, do the following:
In the Google Cloud console, go to the Capacity Planner page.
Optional: To change project or organization, in the project picker at the top of the page, select a project or organization.
Click the Virtual machine tab (default).
In the Usage and forecast by machine family graph, click
Export all.A CSV file downloads to your workstation.
Export the usage data of all your persistent disks
You can export the actual and forecasted usage data of all the persistent disks in your project or organization. In the exported CSV file, the persistent disks are organized by persistent disk type, location, percentile usage, and forecasted usage.
To export the actual and forecasted usage data of all the persistent disks in your project or organization using the Google Cloud console, do the following:
In the Google Cloud console, go to the Capacity Planner page.
Optional: To change project or organization, in the project picker at the top of the page, select a project or organization.
Click the Disk tab.
In the Usage and forecast by disk type graph, click
Export all.A CSV file downloads to your workstation.
Export the usage data of a selected machine family
You can export the actual and forecasted usage data of your project or organization's VMs that use machine types from a specified machine family and location. In the exported CSV file, the VMs are organized by the specified machine family, location, percentile usage, and forecasted usage.
To export the actual and forecast usage data of your VMs with machine types from a specified machine family and region using the Google Cloud console, do the following:
In the Google Cloud console, go to the Capacity Planner page:
Optional: To change project or organization, in the project picker at the top of the page, select a project or organization.
Click the Virtual machine tab (default).
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.
In the Usage percentile list, select a VM usage data percentile.
In the Forecast prediction interval list, select a prediction interval.
In the Location list, select a region or zone.
In the Usage and forecast by machine types table, click
Export.A CSV file downloads to your workstation.
What's next
- Learn how to audit logging information for Capacity Planner.