Integrate Google Cloud Monitoring Grafana Datasource

To set up the Google Cloud Monitoring datasource in Grafana, you need to configure the necessary credentials and permissions. This involves creating a service account in GCP with appropriate permissions to access metrics and data.

For more information see Grafana's Google Cloud Monitoring Datasource documentation

Setting up the service account

Grafana's Google Cloud Monitoring datasource requires a service account with the Monitoring Viewer role.

Create a new service account in the GCP console.

  1. Choose a unique service name, such as groundcover-monitoring

  2. Choose JSON as the key type

  3. Assign the Monitoring Viewer role

Source: Grafana

Create a new service account key

After provisioning the service account above, you will need to create a key to allow the Grafana datasource to authenticate with it.

  1. Access the newly provisioned service account through the Service Accounts page

  2. Click on the Keys tab and choose Add key -> Create new key

  3. Choose the JSON key type

  4. Click Create

The key will be downloaded as a local .json file. You will need this file for the next step.

Provisioning the datasource

Self provisioning of data sources is only available as part of the enterprise plan. If you are on the team plan, contact the groundcover's team to provision the new datasource.

The following steps require a user with admin privileges in the platform

In the Grafana Data sources page, add a new Google Cloud Monitoring datasource.

  1. Name: Select a meaningful name to your choosing.

  2. Authentication:

    1. Authentication type: Select Google JWT File

    2. JWT token: Either upload the file created previously or paste its contents directly using Paste JWT token

Click Save & test to verify the data source correctness.

Use the datasource in groundcover

After provisioning you can now use new Google Cloud Monitoring datasource in groundcover's Grafana. Explore, built dashboards and create alerts based on any metric availalbe in the GCP monitoring stack.

Last updated