Docs » Connect to your cloud service provider » Connect to Google Cloud Platform

Connect to Google Cloud Platform 🔗

Note

To see the list of the GCP services available in Observability Cloud, see our supported integrations.

With a Google Cloud Platform (GCP) integration in Splunk Infrastructure Monitoring, you can track your Google Cloud Monitoring (formerly Google Stackdriver) metrics and monitor your GCP services in one place using the navigator in Stackdriver-powered mode and built-in dashboards.

To configure a GCP integration with Splunk Infrastructure Monitoring, check the prerequisites and follow the instructions on this document. You can also use the API to connect to GCP.

Note

Splunk is not responsible for data availability, and it can take up to several minutes (or longer, depending on your configuration) from the time you connect until you start seeing valid data from your account.

Prerequisites

You must be an administrator of your Splunk Observability Cloud organization to create a GCP connection.

Select a role for the GCP service account

  • If you want to use the Project Viewer role, skip to Configure GCP. Choosing this role ensures that any functionality update implemented in Infrastructure Monitoring doesn’t require changes to your GCP setup.

  • If you want to use a role with more restrictive permissions than those available to Project Viewer, make sure your selected role has sufficient permissions to connect to Infrastructure Monitoring. If your GCP service account role has insufficient permissions, you’ll get an error message when trying to connect to Infrastructure Monitoring. Review and enable any missing permissions, or change the role to Project Viewer.

The following table specifies the permissions required for GCP integrations.

Permission

Required?

monitoring.metricDescriptors.get

Yes

monitoring.metricDescriptors.list

Yes

monitoring.timeSeries.list

Yes

resourcemanager.projects.get

Yes, if you want to sync project metadata, such as labels

serviceusage.services.use

Yes, if you want to enable the use of a quota from the project where metrics are stored

compute.instances.list

Yes, if the Compute Engine service is enabled

compute.machineTypes.list

Yes, if the Compute Engine service is enabled

container.clusters.list

Yes, if the Kubernetes (GKE) service is enabled

container.nodes.list

Yes, if the Kubernetes (GKE) service is enabled

container.pods.list

Yes, if the Kubernetes (GKE) service is enabled

spanner.instances.list

Yes, if the Spanner service is enabled

storage.buckets.list

Yes, if the Spanner service is enabled

Configure GCP

To configure your GCP service, follow these steps:

  1. In a new window or tab, go to the Google Cloud Platform website, and log into your GCP account.

  2. Open the GCP web console, and select a project you want to monitor.

  3. From the sidebar, select IAM & admin > Service Accounts.

  4. Go to Create Service Account at the top of the screen, and complete the following fields:

    Field

    Description

    Service account name

    Enter Splunk.

    Service account ID

    This field autofills after you enter Splunk for Service account name.

    Service account description

    Enter the description for your service account.

  5. Select CREATE.

  6. (Optional) Select a role to grant this Service account access to the selected project, then select CONTINUE.

  7. Enable Key type JSON, and select CREATE. A new service account key JSON file is then downloaded to your computer.

  8. In a new window or tab, go to Cloud Resource Manager API, and enable the Cloud Resource Manager API. You need to enable this API so Splunk Infrastructure Monitoring can use it to validate permissions on the service account keys.

  9. Repeat the following steps for each project you want to monitor with the GCP integration.

Start the integration

By default, all available services are monitored, and any new services added later are also monitored. When you set integration parameters, you can choose to import metrics from a subset of the available services.

  1. Log in to Splunk Observability Cloud.

  2. In the left navigation menu, select Data Management, then select + Add Integration to open the Integrate Your Data page.

  3. In the integration filter menu, select By Use Case, and select the Monitor Infrastructure use case.

  4. In the Cloud Integrations section, select the Google Cloud Platform tile to open the Google Cloud Platform guided setup.

  5. Go to New Integration, enter a name for this GCP integration, then Add Project.

  6. Next, select Import Service Account Key, and select one or more of the JSON key files that you downloaded from GCP in Configure GCP.

  7. Select Open. You can then see the project IDs corresponding to the service account keys you selected.

  8. To import metrics from only some of the available services, follow these steps:

    • Go to All Services to display a list of the services you can monitor.

    • Select the services you want to monitor, and then Apply.

  9. Select the rate (in seconds) at which you want Splunk Observability Cloud to poll GCP for metric data, with 1 minute as the minimum unit, and 10 minutes as the maximum unit. For example, a value of 300 polls metrics once every 5 minutes.

  10. Optional:

    • List any additional GCP service domain names that you want to monitor, using commas to separate domain names in the Custom Metric Type Domains field. For examples of custom metric type domain syntax, see Custom metric type domain examples in the Splunk developer documentation.

    • If you select Compute Engine as one of the services to monitor, you can enter a comma-separated list of Compute Engine Instance metadata keys to send as properties. These metadata keys are sent as properties named gcp_metadata_<metadata-key> in the Google Compute Engine metrics table.

    • Select Use quota from the project where metrics are stored to use a quota from the project where metrics are stored. The service account provided for the project needs either the serviceusage.services.use permission, or the Service Usage Consumer role.

Your GCP integration is now complete.

Integrate GCP using the API

You can also integrate GCP with Splunk Observability Cloud using the GCP API. See Integrate Google Cloud Platform Monitoring with Splunk Observability Cloud for details.