Grafana Cloud Enterprise

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:

  1. Verify you’ve entered a token in the Token field.
  2. Ensure you’re using an API token, not a Global API Key.
  3. 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:

CauseSolution
Invalid tokenVerify the token is correct in the Cloudflare dashboard. Regenerate if necessary.
Expired tokenCreate a new token and update the data source configuration.
Account-owned tokenThe plugin only supports user tokens. Create a user token instead.

“Access denied” or “Authorization failed”

Symptoms:

  • Save & test succeeds but queries fail
  • Zone or account drop-downs are empty
  • Queries return permission errors

Solutions:

  1. Verify your API token has the required permissions. Refer to Required permissions.
  2. Check that the token has access to the specific zones or accounts you’re querying.
  3. 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:

  1. Verify network connectivity from the Grafana server to api.cloudflare.com.
  2. Check that firewall rules allow outbound HTTPS (port 443) to Cloudflare.
  3. For Grafana Cloud with private networks, configure Private data source connect.
  4. 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:

CauseSolution
Time range doesn’t contain dataExpand the dashboard time range or verify data exists in Cloudflare.
Wrong zone selectedVerify you’ve selected the correct zone from the drop-down.
No DNS trafficConfirm the zone has DNS traffic during the selected time period.
Permissions issueVerify the token has Analytics read access for the selected zone.

Query timeout

Symptoms:

  • Query runs for a long time then fails
  • Error mentions timeout

Solutions:

  1. Narrow the time range to reduce data volume.
  2. Reduce the Limit parameter for analytics queries.
  3. Remove dimensions to reduce result set size.
  4. 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:

  1. Verify the API token has Zone > Zone > Read permission for zones.
  2. Verify the API token has Account > Account Settings > Read permission for accounts.
  3. Check that the token scope includes the zones/accounts you expect to see.
  4. 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:

  1. Radar APIs are publicly accessible and don’t require special permissions.
  2. Verify the dashboard time range is reasonable (Radar data may have delays).
  3. 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:

  1. Reduce the frequency of dashboard auto-refresh.
  2. Increase the time range granularity to reduce API calls.
  3. Use query caching in Grafana (available in Grafana Enterprise and Grafana Cloud).
  4. Reduce the number of panels querying the same data source simultaneously.

Enable debug logging

To capture detailed error information for troubleshooting:

  1. Set the Grafana log level to debug in the configuration file:

    ini
    [log]
    level = debug
  2. Review logs in /var/log/grafana/grafana.log (or your configured log location).

  3. Look for entries containing “cloudflare” for plugin-specific logs.

  4. Reset the log level to info after troubleshooting to avoid excessive log volume.

Get additional help

If you’ve tried these solutions and still encounter issues:

  1. Check the Grafana community forums for similar issues.
  2. Review the Cloudflare API documentation for API-specific errors.
  3. 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)