docs/sources/datasources/google-cloud-monitoring/troubleshooting/index.md
This document provides solutions to common issues you may encounter when configuring or using the Google Cloud Monitoring data source. For configuration instructions, refer to Configure Google Cloud Monitoring.
These errors occur when GCP credentials are invalid, missing, or don't have the required permissions.
Symptoms:
Possible causes and solutions:
| Cause | Solution |
|---|---|
| Service account missing required permissions | Assign the Monitoring Viewer role to the service account in the GCP Console under IAM & Admin > IAM. Refer to Configure Google Cloud Monitoring for details. |
| Incorrect service account key file | Verify the JSON key file was downloaded correctly and contains valid credentials. Generate a new key if necessary. |
| Service account key has been deleted | Check the service account in GCP Console under IAM & Admin > Service Accounts. If the key was deleted, create a new one. |
| Wrong project selected | Verify the default project in the data source configuration matches a project the service account has access to. |
| APIs not enabled | Enable the Monitoring API and Cloud Resource Manager API in the GCP Console. Refer to Configure Google Cloud Monitoring for links. |
Symptoms:
Solutions:
type, project_id, private_key_id, private_key, client_email, client_id, auth_uri, token_uri.Symptoms:
Solutions:
Symptoms:
Solutions:
roles/iam.serviceAccountTokenCreator role on the target service account.These errors occur when Grafana cannot reach Google Cloud Monitoring endpoints.
Symptoms:
Solutions:
monitoring.googleapis.com).Symptoms:
Solutions:
These errors occur when querying Google Cloud Monitoring metrics.
Symptoms:
Possible causes and solutions:
| Cause | Solution |
|---|---|
| Time range doesn't contain data | Expand the dashboard time range. GCP metrics have different retention periods based on the metric type. |
| Wrong project selected | Verify you've selected the correct project in the query editor. |
| Incorrect metric type | Verify the service, metric type, and metric are correct. Check available metrics in the GCP Console Metrics Explorer. |
| Missing labels/filters | Some metrics require specific label filters to return data. Try removing filters to see if data appears. |
| Resource not emitting metrics | Verify the resource exists and is actively emitting metrics. Some metrics only populate under certain conditions. |
Symptoms:
Solutions:
Symptoms:
Solutions:
Symptoms:
Solutions:
Symptoms:
Solutions:
These errors are specific to Service Level Objective (SLO) queries.
Symptoms:
Solutions:
Symptoms:
Solutions:
These errors occur when using template variables with the Google Cloud Monitoring data source.
Symptoms:
Solutions:
Symptoms:
Solutions:
For more information on template variables, refer to the template variables documentation.
These issues occur with the bundled pre-configured dashboards.
Symptoms:
Solutions:
To capture detailed error information for troubleshooting:
Set the Grafana log level to debug in the configuration file:
[log]
level = debug
Review logs in /var/log/grafana/grafana.log (or your configured log location).
Look for Google Cloud Monitoring-specific entries that include request and response details.
Reset the log level to info after troubleshooting to avoid excessive log volume.
If you've tried the solutions above and still encounter issues: