This is documentation for the next version of Grafana documentation. For the latest stable release, go to the latest version.
Troubleshoot Google Cloud Monitoring data source issues
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.
Authentication errors
These errors occur when GCP credentials are invalid, missing, or don’t have the required permissions.
“Permission denied” or “Access denied”
Symptoms:
- Save & test fails with permission errors
- Queries return authorization errors
- Projects, metrics, or labels don’t load
Possible causes and solutions:
“Invalid JWT” or “JWT token error”
Symptoms:
- Authentication fails when using Google JWT File
- Error message references invalid or malformed JWT
Solutions:
- Verify you uploaded the complete JSON key file, not just the private key portion.
- Check that the JSON file is properly formatted and not corrupted.
- Ensure the key file contains all required fields:
type,project_id,private_key_id,private_key,client_email,client_id,auth_uri,token_uri. - Generate a new service account key and re-upload it.
GCE Default Service Account not working
Symptoms:
- Data source test fails when using GCE Default Service Account
- Works with JWT but fails with GCE authentication
Solutions:
- Verify Grafana is running on a Google Compute Engine (GCE) virtual machine.
- Check that the GCE instance has the Cloud Monitoring API scope enabled.
- Verify the GCE default service account has the Monitoring Viewer role.
- If the VM was created without the required scope, you may need to stop the instance, edit it to add the scope, and restart.
Service account impersonation errors
Symptoms:
- Authentication fails when service account impersonation is enabled
- Error: “Unable to impersonate service account”
Solutions:
- Verify the primary service account has the
roles/iam.serviceAccountTokenCreatorrole on the target service account. - Check that the target service account email is entered correctly.
- Ensure the target service account has the Monitoring Viewer role.
- Verify both service accounts are in projects that have the required APIs enabled.
Connection errors
These errors occur when Grafana cannot reach Google Cloud Monitoring endpoints.
“Request timed out” or connection failures
Symptoms:
- Data source test times out
- Queries fail with timeout errors
- Intermittent connection issues
Solutions:
- Verify network connectivity from the Grafana server to Google Cloud endpoints (
monitoring.googleapis.com). - Check firewall rules allow outbound HTTPS (port 443) to Google Cloud services.
- For Grafana Cloud connecting to private resources, configure Private data source connect.
- Check if a corporate proxy is blocking connections to Google Cloud.
“SSL certificate problem”
Symptoms:
- SSL/TLS handshake errors
- Certificate verification failures
Solutions:
- Ensure the system time is correct on the Grafana server.
- Verify the Grafana server has up-to-date CA certificates installed.
- Check if a corporate proxy is intercepting HTTPS traffic.
Metrics query errors
These errors occur when querying Google Cloud Monitoring metrics.
“No data” or empty results
Symptoms:
- Query executes without error but returns no data
- Charts show “No data” message
Possible causes and solutions:
Metrics don’t appear in drop-down
Symptoms:
- Expected metrics don’t appear in the query editor
- Metric drop-down is empty for a service
Solutions:
- Verify the metric exists in the selected project and region.
- Check that the service account has the Monitoring Viewer role.
- Some metrics are only available for specific resource types. Check the Google Cloud metrics list.
- Use the Query Inspector to verify the API request and response.
Label values not loading
Symptoms:
- Label value drop-down doesn’t populate
- Filters can’t be applied
Solutions:
- Verify the service account has the Monitoring Viewer role.
- Ensure a project, service, and metric are selected before label values can load.
- Label values are populated from existing metric data. If no metrics match the current selection, no values appear.
MQL query errors
Symptoms:
- Monitoring Query Language (MQL) queries fail with syntax errors
- MQL query returns unexpected results
Solutions:
- Validate your MQL syntax using the MQL reference documentation.
- Check for typos in metric types, label names, or function names.
- Ensure time range syntax is valid in your query.
- Test the query in the GCP Console Metrics Explorer before using it in Grafana.
“Too many data points” or API throttling
Symptoms:
- Queries fail with quota errors
- Performance degrades with multiple panels
Solutions:
- Increase the alignment period to reduce the number of data points.
- Reduce the time range of your queries.
- Use fewer metric queries per panel.
- Request a quota increase in the GCP Console under APIs & Services > Quotas.
- Enable query caching in Grafana to reduce API calls.
SLO query errors
These errors are specific to Service Level Objective (SLO) queries.
SLO services don’t appear
Symptoms:
- SLO service selector is empty
- Can’t find expected SLO services
Solutions:
- Verify SLOs are defined in Google Cloud Monitoring for the selected project.
- Check that the service account has access to view SLOs.
- Ensure the project has services configured in the Service Monitoring section of the GCP Console.
SLO query returns no data
Symptoms:
- SLO query executes but returns no data
- SLO values show as empty
Solutions:
- Verify the SLO exists and is active in the GCP Console.
- Check that the time range includes periods when the SLO had data.
- Ensure the selected SLO selector (SLI value, compliance, error budget, etc.) is appropriate for the SLO type.
- Some SLOs may not have data if the underlying service hasn’t received traffic.
Template variable errors
These errors occur when using template variables with the Google Cloud Monitoring data source.
Variables return no values
Symptoms:
- Variable drop-down is empty
- Dashboard fails to load with variable errors
Solutions:
- Verify the data source connection is working.
- Check that the service account has permissions to list the requested resources.
- For dependent variables, ensure parent variables have valid selections.
- Verify the project is selected correctly in the variable query.
Variables are slow to load
Symptoms:
- Dashboard takes a long time to load
- Variable selectors are slow to populate
Solutions:
- Set variable refresh to On dashboard load instead of On time range change.
- Reduce the scope of variable queries (filter by specific project or service).
- Limit the number of dependent variables in a chain.
For more information on template variables, refer to the template variables documentation.
Pre-configured dashboard issues
These issues occur with the bundled pre-configured dashboards.
Imported dashboards show no data
Symptoms:
- Imported dashboards show empty panels
- Template variables don’t load
Solutions:
- Verify the data source name in the dashboard matches your Google Cloud Monitoring data source.
- Check that the service account has access to the projects shown in the project variable.
- Ensure the resources (Compute Engine instances, Cloud SQL, etc.) exist and are emitting metrics.
- Verify the required GCP services are enabled in your project.
Enable debug logging
To capture detailed error information for troubleshooting:
Set the Grafana log level to
debugin the configuration file:[log] level = debugReview 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
infoafter troubleshooting to avoid excessive log volume.
Get additional help
If you’ve tried the solutions above and still encounter issues:
- Check the Grafana community forums for similar issues.
- Review Google Cloud Monitoring issues on GitHub for known bugs.
- Consult the Google Cloud Monitoring documentation for service-specific guidance.
- Contact Grafana Support if you’re an Enterprise, Cloud Pro, or Cloud Contracted user.
- When reporting issues, include:
- Grafana version
- GCP project (redact if sensitive)
- Error messages (redact sensitive information)
- Steps to reproduce
- Query configuration (redact credentials)



