Google Cloud Platform (GCP) plugin

For more information about what this plugin does and the data streams it retrieves, see:

Google Cloud Platform

Monitor your GCP environment, including GKE, Hosts and more.

To add a data source click on the + next to Data Sources on the left-hand menu in SquaredUp. Search for the data source and click on it to open the Configure data source page.

Before you start

In the GCP console select your project and check that the following are enabled:

To view cost information in SquaredUp using the Cost data stream check the following:

GCP Service Account Configuration

  1. Create a new Service Account, or edit an existing account.
    See GCP - Creating and managing service accounts
  2. Ensure the account has the role Viewer by adding the role Basic > Viewer.
    To view cost information, the account also needs to have BigQuery Data Viewer role.
    See GCP - Grant a single role
  3. Create a new key for the Service Account using the key type JSON. Download the JSON file as you will need to copy information from this JSON file when adding the data source next.
    See GCP - Creating service account keys

    Make sure to store the key file securely, because it can be used to authenticate as your service account.

Configuring the data source

  1. Open the JSON file that you downloaded when creating the key.
  2. Copy and paste the clientEmail from the JSON file into the data source form.
  3. Copy and paste the private_key from the JSON file into the data source form (everything between the quotes).
  4. Copy and paste the project_ids from the JSON file into the data source form.
  5. Optionally, to use the Cost data stream, copy and paste in the billingProjectId, billingDataSetName and billingTableName.
  6. Restrict access to this data source:
    You can enable this option if you only want certain users or groups to have access to the data source, or the permission to link it to new workspaces. See data source access control for more information.

  7. Click Test and add to validate the data source configuration. SquaredUp will now attempt to connect to SquaredUp using the provided authentication method. If this process fails, see Testing and troubleshooting for assistance with the corresponding errors.

Next steps

Data streams

The following data streams are installed with this plugin.

See also Tips for using the GCP Cost data stream.

Writing a custom data stream (advanced users)

Add one or more custom data streams in SquaredUp.

  1. In SquaredUp, browse to Settings > Advanced > Data Streams.
  2. Click Add custom data stream.
  3. Add your custom data stream by entering the following settings:
    1. Name:
      Enter a display name for your data stream.

      The display name is the name that you use to identify your data stream in SquaredUp. It has no technical impact and doesn't need to be referenced in the data stream's code.

    2. Data source:
      Choose the data source this data stream is for.
      After you've chosen the data source the Entry Point field displays.
    3. Entry Point:
      Specify the data stream entry point and enter the Code below.
      To find out which entry point to select and get code examples for the Code field, see the help below.
  4. Click Save to save your data stream.

Tips for using the GCP Cost data stream

The Cost data stream is part of the GCP data source and uses the GCP BigQuery API. The GCP data source needs some additional configuration to enable the Cost data stream see How to add a Google Cloud Platform data source

  • The GCP Cost data stream shows daily data.
  • By default the Cost data stream splits costs by service.
  • We recommend scopes used with the GCP Cost data stream contain only one type of object, for example, only accounts, projects or hosts. Mixed scopes may include duplicated data in the results, because a query is sent for each type of object in the scope, and the results are combined. For example, resulting data would show the cost of a host, as well as the cost of a project, even if the host is part of that project. It is useful to create a scope for your account(s), a scope of project(s) and a scope for hosts.

Use Cases for the GCP Cost data stream

Was this article helpful?


Have more questions or facing an issue?