Connecting to GCP - Recommender

Connections are how CloudZero manages the various Cost Sources that bring Billing, Resource, and other types of data into the platform.

Introduction

CloudZero can seamlessly ingest GCP Recommender data by connecting to your BigQuery tables that store this data. Recommender data provides valuable insights and recommendations about your GCP cloud costs:

  • Insights: Identify issues such as overpayments for reserved instances.
  • Recommendations: Suggest corrective actions, like modifying your reservation plan.

CloudZero leverages this Recommender data to enhance its own automated insights feature, offering a comprehensive view for optimizing your cloud costs.

For a full list of supported Recommenders, see Supported GCP Recommenders.

📘

About CloudZero's Access to your GCP Accounts

All of CloudZero's permissions are Read-Only

We have no access to data except where explicitly authorized (for example, the data you explicitly share with CloudZero).

Summary of Permissions:

  • BigQuery Data Viewer: grants read access only, to allow loading data from Cloud Billing Export and Cloud files stored in BigQuery

Connect GCP Recommender Data to CloudZero

You must have an existing GCP Billing connection before you can set up GCP Recommender ingest.

Setting up a GCP Recommender connection is similar to setting up a GCP Billing connection.

Complete the following steps to set up a GCP Recommender connection:

  1. Configure a Data Transfer for recommendations in GCP.
  2. Set up Recommender ingest in CloudZero.
  3. Grant access to CloudZero.
  4. Save the connection.

Step 1: Configure a Data Transfer for Recommendations in GCP

First, you must configure a Data Transfer for Recommender data in the Google Cloud console. You may already have completed these steps for other purposes, but confirm the steps here match what you have previously set up.

  1. Set up a Data Transfer in GCP BigQuery by following the Create a Data Transfer for Recommendations instructions.

  2. Once both the insights_export and recommendations_export tables are accessible, make note of each table's fully qualified name for use in the next step. This name consists of the Project ID, Dataset, and Table name of the table you configured.

    • For example:
      • billing-administration-123456.all_recommender_data.insights_export
      • billing-administration-123456.all_recommender_data.recommendations_export
    • In the examples:
      • Project ID: billing-administration-123456
      • Dataset: all_recommender_data
      • Table name: insights_export or recommendations_export

GCP Recommender Table

📘

Note that it can take up to 24-48 hours for your export table to appear. It does not appear until GCP completes its first data drop, which can take a day or two. You cannot continue the connection process until the table has been created.

Step 2: Set up Recommender Ingest in CloudZero

Once the insights_export and recommendations_export tables are available, you can set up GCP Recommender ingest in the CloudZero platform.

  1. In CloudZero, navigate to Settings by selecting the gear icon in the top navigation bar.
Settings Icon
  1. Select the Add Connection button.

  2. Select GCP Recommender > Get started.

  3. Enter a Connection Name. This is the name you will see throughout the CloudZero platform. It cannot contain spaces, periods, or special characters (except for hyphens and underscores).

  4. Enter the Fully Qualified Insights Table Name you copied from the previous step. Example: billing-administration-341920.all_recommender_data.insights_export

  5. Enter the Fully Qualified Recommendations Table Name you copied from the previous step. Example: billing-administration-341920.all_recommender_data.recommendations_export

GCP Recommender Table Fields

Step 3: Grant Access to CloudZero

At this point, you need to grant CloudZero's service principal access to your GCP Recommender Data. Copy the Service Principal ID shown in the Grant Access to CloudZero section:

Copy the Service Principal ID

In the instructions below, replace <cz-service-principal> with the service principal ID you copied.

  1. Log into the GCP Console.
  2. Select the Project which holds your Recommender data and go to BigQuery.
  3. Find the insights_export table.
  4. Select that table and click [+SHARE].
  5. Click [+ ADD PRINCIPAL].
  6. Add the service account and role, then click [SAVE].
    • Service Account: <cz-service-principal>
    • Role: BigQuery Data Viewer

Step 4: Save Connection in CloudZero

In CloudZero, select the Save button. CloudZero redirects you to the Cloud Integrations page, where you can view your new GCP Recommender connection in the Billing Connections table:

GCP Recommender connections in the Billing Connections table

The GCP Recommender connection will have a Status of Pending Data and a Last Checked status of Pending First Ingest while CloudZero attempts to connect to your BigQuery table using the Service Principal assigned to your organization.

After CloudZero has processed the first ingest of data, the Status changes from Pending Data to Healthy. This can take several hours.

View Connection Details

After you have created the GCP Recommender connection, select its name in the Cloud Integrations page to view detailed information, including the following:

  • Connection status
  • Connection name
  • Connection ID
  • GCP connection ID
  • Service principal name
  • Fully qualified Insights table name
  • Fully qualified Recommendations table name
  • When the connection was created
  • When the connection was most recently checked for new data

GCP Recommender connection details