Troubleshoot Cloudflare data source issues
This document provides solutions to common issues you might encounter when configuring or using the Cloudflare data source. For configuration instructions, refer to Configure the Cloudflare data source.
Authentication errors
These errors occur when credentials are invalid, missing, or don’t have the required permissions.
“invalid/empty bearer token”
Symptoms:
- Save & test fails with “invalid/empty bearer token” error
- Data source configuration won’t save
Solutions:
- Verify you’ve entered a token in the Token field.
- Ensure you’re using an API token, not a Global API Key.
- Check that the token was copied correctly without extra spaces.
“status code: 400” or “Authentication error”
Symptoms:
- Save & test fails with status code 400
- Queries return authentication errors
Possible causes and solutions:
“Access denied” or “Authorization failed”
Symptoms:
- Save & test succeeds but queries fail
- Zone or account drop-downs are empty
- Queries return permission errors
Solutions:
- Verify your API token has the required permissions. Refer to Required permissions.
- Check that the token has access to the specific zones or accounts you’re querying.
- Create a new token with the correct permissions:
- Account > Account Settings > Read for account queries
- Zone > Zone > Read for zone queries
- Zone > Analytics > Read for DNS analytics queries
Connection errors
These errors occur when Grafana can’t reach Cloudflare’s API endpoints.
“Connection refused” or timeout errors
Symptoms:
- Data source test times out
- Queries fail with network errors
- Intermittent connection issues
Solutions:
- Verify network connectivity from the Grafana server to
api.cloudflare.com. - Check that firewall rules allow outbound HTTPS (port 443) to Cloudflare.
- For Grafana Cloud with private networks, configure Private data source connect.
- Check Cloudflare’s system status for any ongoing incidents.
Query errors
These errors occur when executing queries against the Cloudflare API.
“No data” or empty results
Symptoms:
- Query executes without error but returns no data
- Charts show “No data” message
- Tables are empty
Possible causes and solutions:
Query timeout
Symptoms:
- Query runs for a long time then fails
- Error mentions timeout
Solutions:
- Narrow the time range to reduce data volume.
- Reduce the Limit parameter for analytics queries.
- Remove dimensions to reduce result set size.
- For DNS analytics, try querying a shorter time period first.
Zone or account drop-downs are empty
Symptoms:
- Zone ID drop-down shows no options
- Account ID drop-down shows no options
Solutions:
- Verify the API token has Zone > Zone > Read permission for zones.
- Verify the API token has Account > Account Settings > Read permission for accounts.
- Check that the token scope includes the zones/accounts you expect to see.
- Test the token directly with the Cloudflare API to verify access.
Radar query issues
Radar queries return no data
Symptoms:
- Radar queries execute but return empty results
- Time series show no data points
Solutions:
- Radar APIs are publicly accessible and don’t require special permissions.
- Verify the dashboard time range is reasonable (Radar data may have delays).
- Check that Cloudflare Radar is operational at radar.cloudflare.com.
Performance issues
Slow queries or API throttling
Symptoms:
- Queries take a long time to complete
- Intermittent failures
- “Rate limit” errors
Solutions:
- Reduce the frequency of dashboard auto-refresh.
- Increase the time range granularity to reduce API calls.
- Use query caching in Grafana (available in Grafana Enterprise and Grafana Cloud).
- Reduce the number of panels querying the same data source simultaneously.
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 entries containing “cloudflare” for plugin-specific logs.
Reset the log level to
infoafter troubleshooting to avoid excessive log volume.
Get additional help
If you’ve tried these solutions and still encounter issues:
- Check the Grafana community forums for similar issues.
- Review the Cloudflare API documentation for API-specific errors.
- Contact Grafana Support if you’re a Grafana Cloud or Enterprise customer.
When reporting issues, include:
- Grafana version
- Plugin version
- Error messages (redact sensitive information like tokens)
- Steps to reproduce
- Relevant configuration (redact credentials)



