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.
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.
- Choose a unique service name, such as - groundcover-monitoring
- Choose - JSONas the key type
- Assign the - Monitoring Viewerrole

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.
- Access the newly provisioned service account through the - Service Accountspage
- Click on the - Keystab and choose- Add key->- Create new key
- Choose the - JSONkey type
- Click - Create
The key will be downloaded as a local .json file. You will need this file for the next step.
Provisioning the datasource
In the Grafana Data sources page, add a new Google Cloud Monitoring datasource.
- Name: Select a meaningful name to your choosing. 
- Authentication: - Authentication type: Select - Google JWT File
- 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
