Optimize costs with the Cost Explorer

The Cost Explorer page lets you monitor and understand the costs and utilization of resources in your Google Cloud project or App Hub application. The Cost Explorer provides a current and historical visualization of cost data and utilization metrics, helping you make informed decisions about optimization opportunities.

You might use the Cost Explorer when you want to do the following:

  • Determine how costs have increased for the App Hub workload cymbal in the last two weeks.

  • Determine which resources in your Google Cloud project have high cost and low utilization.

  • Identify high-cost Compute Engine managed instance groups (MIGs) that have a low utilization within an application.

Cost Explorer uses data provided by the Cloud Billing export to BigQuery. If you want to perform a more detailed cost analysis in BigQuery, you can use the export feature directly.

Limitations

  • During private preview, some cost and cost change data might be incomplete, including data for Compute Engine MIGs, Google Kubernetes Engine (GKE) zonal clusters, and App Hub applications. Additionally, costs for Compute Engine VMs, Compute Engine MIGs, and GKE clusters don't include network charges for data egress or Persistent Disk usage.

  • Costs are displayed in US dollars. You cannot change the currency.

  • If you are viewing data for an App Hub application, then you can't view or filter resources by location.

Before you begin

The Cost Explorer uses Cloud Billing to retrieve cost data, and Cloud Monitoring for utilization metrics. To use the Cost Explorer, you need access to Monitoring data and configuration information, as well as the ability to view Cloud Billing data.

If you want to view cost data by App Hub application, then make sure that you have set up App Hub for an app-enabled folder and created your applications.

The Cost Explorer only supports applications managed by an app-enabled folder. It doesn't support applications managed by a host project.

Required roles

Using the Cost Explorer requires different permissions depending on whether you are viewing by project or by application.

View by project

To get the permissions that you need to view cost and utilization data for a project, ask your administrator to grant you the following IAM roles on the project:

  • View utilization data: Monitoring Viewer (roles/monitoring.viewer)
  • View costs: Viewer (roles/viewer) or a custom role with the billing.resourceCosts.get permission

If your administrator already granted you the Cloud Hub Operator (roles/cloudhub.operator) role, then the Monitoring Viewer permissions are included in that role.

View by application

To get the permissions that you need to view cost and utilization data for an application, ask your administrator to grant you the following IAM roles on management project in the app-enabled folder:

View the Cost Explorer

To view the Cost Explorer, do the following:

  1. In the Google Cloud console, go to the Cost Explorer page:

    Go to Cost Explorer

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select the project or application that you want to view:

    • To view data for a project, select a project from the project picker at the top of the page.

    • To view data for an application, in the toolbar of the Google Cloud console, select the management project for your app-enabled folder. Then, go to the toolbar of the Cost Explorer, and set the view to Application. If you don't know which project to select, ask your administrator.

You can also view cost and utilization data from the Optimization page in Cloud Hub. The Optimization page displays an overview of the data you see in the Cost Explorer, letting you identify trends at a glance. You can see total cost trends for your selected project or application, the top 5 resources by cost change, and the 5 most underutilized resources. In the Resources by cost and utilization section, you can further explore your cost and utilization data by clicking View details in Cost Explorer.

Explore your costs and utilization

The Cost Explorer lets you view only cost data, or cost data in tandem with utilization metrics.

You can filter the data presented by adjusting the time-range selector, where you can select 1 day, 7 days, 14 days, or 30 days.

Cloud Billing and the Cost Explorer categorize product-related costs differently.

The Cost Explorer organizes costs logically by product. Cloud Billing groups SKUs for resource usage into services. A service in Cloud Billing might be a subset of a Google Cloud product or might include SKUs from multiple Google Cloud products. These Cloud Billing services are unrelated to App Hub services.

For example, the costs for Compute Engine and GKE products are equivalent to multiple Cloud Billing services.

Product in the Cost Explorer Service in Cloud Billing
Compute Engine Compute Engine and VM Manager
GKE Compute Engine and GKE
Persistent Disk Compute Engine

The Networking service includes SKUs for many networking products such as Cloud Load Balancing, Cloud NAT, Cloud VPN, Private Service Connect, and Performance Dashboard. The Cost Explorer categorizes these costs by product, but Cloud Billing only provides a single Networking service and doesn't have defined services for each networking product.

You can search the list of Google Cloud SKUs to learn more about how SKUs are categorized in Cloud Billing.

Analyze by cost

The Cost summary for selected scope section of the Cost Explorer displays data about the total cost, total cost change, and total cost change by resource.

The total cost is based on usage in the selected project or application based on your contract prices, before any committed-use discounts (CUDs) or other credits are applied. For an application, the total cost includes all resources that are fully used by the application. This total cost doesn't include costs for resources that are shared across applications.

Analyze by cost and utilization

For supported Google Cloud products, you can further explore costs in relation to resources in the Explore analyzed resources section.

This section lets you select a metric that aggregates cost and utilization, presenting a treemap that organizes cost by size, and utilization by color. For example, this section might be helpful in identifying resources that cost the most, while also having low CPU utilization in the last 30 days.

Supported products

The Product filter in the Cost Explorer lists products that are integrated with the Cost Explorer.

The following table lists supported products with resource-level cost data.

Product name Supported resource types
AlloyDB for PostgreSQL Backup
Cluster
Instance
Bigtable App Profile
Instance
Cloud Deploy Delivery pipeline
Cloud Run functions Function
Compute Engine Address
Disk
Forwarding rule
Global address
Global forwarding rule
Image
Instance
Instant snapshot
VLAN attachment
Machine image
Machine instanced group
Network attachment
Reservation
Router
Snapshot
Storage pool
Target VPN gateway
VPN gateway
VPN tunnel
Google Kubernetes Engine Cluster
Dataflow Job
Snapshot
Cloud Data Fusion Instance
Dataproc Metastore Service
Firestore Database
Backup for GKE Backup plan
Cloud Logging Log bucket
Managed Service for Microsoft Active Directory Domain
Memorystore for Redis Instance
Cloud Run Job
Service
Secret Manager Secret
Spanner Instance
Database
Cloud SQL Admin API Instance
Cloud Storage Bucket

When you view the table for total cost and the table for aggregated cost and cost change in the Cost Explorer, unsupported products are classified as Other in the Product column. Resources that aren't supported for resource-level cost data are classified as Other in the Resource Type column.

What's next