Introduction
When a Grafana panel fails to display, you may see a blank panel, an error message like "No data" or "Query error," or a partially rendered visualization. The root cause can be in the datasource query, the panel configuration, the visualization plugin, or Grafana's rendering backend. Systematic diagnosis helps identify and fix the issue efficiently.
Symptoms
- Panel shows "No data" even though data should exist
- Error message: "Failed to query datasource" or "Query timeout"
- Panel displays "Unknown error" without specific details
- Visualization appears distorted or partially rendered
- Panel shows "Plugin not found" or "Plugin error"
- Time series graph shows no lines or incorrect scales
- Table panel shows empty rows or wrong column formatting
Common Causes
- Datasource query has syntax errors or returns no results
- Query time range doesn't match data availability
- Datasource connection is down or throttled
- Panel visualization type requires uninstalled plugin
- Query returns data in format incompatible with panel type
- Rendering backend (image renderer) is misconfigured
- Panel min/max or scale settings hide the data
Step-by-Step Fix
Query and Datasource Issues
- 1.Test the query in Grafana Explore:
- 2.- Navigate to Explore
- 3.- Select the same datasource
- 4.- Run the exact query from the panel
- 5.- Check for errors or empty results
- 6.Verify datasource connectivity:
- 7.```bash
- 8.curl -s -u admin:password http://localhost:3000/api/datasources/proxy/1/api/v1/query?query=up
- 9.
` - 10.Check query time range:
- 11.- Ensure dashboard time range covers period with data
- 12.- Try expanding time range (e.g., from "Last 6 hours" to "Last 24 hours")
- 13.- Verify data exists for the selected range in your datasource
- 14.Test query with different time range:
- 15.```bash
- 16.# For Prometheus
- 17.curl -s "http://prometheus:9090/api/v1/query_range?query=rate(http_requests_total[5m])&start=now-24h&end=now&step=60s"
- 18.
`
Query Syntax Errors
- 1.Check for common query syntax issues:
Prometheus queries:
- Missing rate/increase wrapper for counters
- Incorrect label matchers (use = not ==)
- Missing aggregation operators for multi-series data
``promql
# Common fix: use sum by for multi-series
sum by (instance) (rate(cpu_usage[5m]))
InfluxDB queries:
- Incorrect field/tag names
- Missing GROUP BY clause
``sql
# Common fix
SELECT mean("value") FROM "measurement" WHERE time > now() - 6h GROUP BY time(1m)
MySQL/PostgreSQL queries:
- Missing time column format
- WHERE clause filtering out all data
``sql
# Correct time format
SELECT time_epoch as time, value FROM metrics WHERE time_epoch > UNIX_TIMESTAMP(NOW() - INTERVAL '6 hours')
- 1.Validate query returns correct format for panel type:
- 2.- Time series panels need:
time,valuecolumns - 3.- Table panels need: any columns with proper naming
- 4.- Stat panels need: single numeric value
- 5.- Gauge panels need: single numeric value within defined range
Panel Configuration Issues
- 1.Check panel visualization settings:
- 2.- Click panel title > Edit
- 3.- Verify visualization type matches query output
- 4.- Check "Format as" setting in query (Table vs Time series)
- 5.Fix min/max display settings:
- 6.- Navigate to Panel settings > Standard options
- 7.- Check "Min" and "Max" values
- 8.- If Min > actual values, data won't display
- 9.- Try setting Min to "auto" or removing fixed values
- 10.Check data transformation settings:
- 11.- Navigate to Transform tab
- 12.- Verify transformations don't filter out all data
- 13.- Remove unnecessary transformations temporarily
Plugin Issues
- 1.Check for missing plugins:
- 2.```bash
- 3.grafana-cli plugins ls
- 4.
` - 5.Install required panel plugin:
- 6.```bash
- 7.grafana-cli plugins install grafana-clock-panel
- 8.grafana-cli plugins install grafana-piechart-panel
- 9.
` - 10.For custom panel types, verify plugin is loaded:
- 11.```bash
- 12.journalctl -u grafana-server | grep -i "plugin.*load"
- 13.
` - 14.Check panel type in dashboard JSON:
- 15.```bash
- 16.jq '.panels[] | select(.title == "Your Panel") | .type' dashboard.json
- 17.
`
Rendering Issues
- 1.For image rendering errors, check renderer configuration:
- 2.```ini
- 3.# In grafana.ini
- 4.[rendering]
- 5.server_url = http://renderer:8081/render
- 6.callback_url = http://grafana:3000/
- 7.
` - 8.Test image renderer connectivity:
- 9.```bash
- 10.curl -v http://renderer:8081/render
- 11.
` - 12.For native rendering, check browser console for JavaScript errors:
- 13.- Open browser developer tools (F12)
- 14.- Check Console tab for errors
- 15.- Look for errors related to panel rendering
Datasource Format Issues
- 1.Check query "Format as" setting:
- 2.- For time series graphs: "Time series"
- 3.- For tables: "Table"
- 4.- For single stats: "Table" (with single value)
- 5.Fix multi-series display in time series:
- 6.```promql
- 7.# If showing multiple lines, use legend format
- 8.Legend: {{instance}}
- 9.
` - 10.Handle "No data" display:
- 11.- Panel settings > Standard options > No value
- 12.- Set custom text for "No data" display
- 13.- Or use "Nulls as zeroes" in query options
Verification
- 1.Verify panel displays data:
- 2.- Refresh dashboard
- 3.- Confirm panel shows expected visualization
- 4.- Check values are within expected ranges
- 5.Verify query returns data:
- 6.- Open panel in Edit mode
- 7.- Check query preview/inspector
- 8.- Confirm data rows are returned
- 9.Test dashboard across different time ranges:
- 10.- Change dashboard time range
- 11.- Verify panels update correctly
- 12.- Check for time range-specific errors