Skip to content

Grafana Dashboard Is Blank or Misaligned — A Troubleshooting Decision Tree

I once inherited a Grafana dashboard that the team reported as "all grey". I opened a panel and confirmed the data source was connected and that up returned values, yet not a single panel on the board had a curve. It took me twenty minutes to find the cause: the dashboard had been cloned from a different environment, and none of the variables those panels referenced were defined in this environment. So $instance in every query resolved to an empty string, turning each PromQL statement into rate(node_cpu_seconds_total{job=""}[5m]) — a query that matches nothing.

Since then I keep a small decision tree with six branches: data source, time range, variables, units, query semantics, and panel mapping. Each branch has a cross-check I can run before I touch anything.

Pit one: the data source has no data at all

The deepest reason a dashboard is blank is that the data source to Prometheus link is broken in itself.

# open the data source page in Grafana, go to Query, and run
# up, or hit the proxy API with a Grafana token
curl -s -H "Authorization: Bearer $GTO" \
  -G "http://localhost:3000/api/datasources/proxy/uid/0/prometheus/api/v1/query" \
  --data-urlencode 'query=up'

If that returns result=[], the data source layer is dead. Go back to Prometheus targets and the network before spending time here.

Another variation I have hit: the data source is connected but Prometheus retention is only four hours, so a dashboard pulling yesterday's curves is blank. This one is easy to miss because the source "can return values", it just returns only the last four hours. Check retention:

curl -s http://localhost:9090/api/v1/status/runtimeinfo | jq '.data.tsdb.retention.time'

Pit two: the time range does not line up

The second most common reason a dashboard renders empty is the time range. Two typical misalignments:

  • The range is set to last 30 days but Prometheus keeps only 48 hours. Result: the curve exists on the left and is blank on the right.
  • The range is last 5 minutes but a panel is bound to a low-frequency recording rule that emits a point every five minutes, so a 5-minute window lands on nothing.

Two quick checks:

# see how far back the source actually returns data
curl -s -G "http://localhost:3000/api/datasources/proxy/uid/0/prometheus/api/v1/query_range" \
  --data-urlencode 'query=up' \
  --data-urlencode 'start=2026-09-01T00:00:00Z' \
  --data-urlencode 'step=3600' | jq '.data.result | length'

Thousands of points means retention is fine. Zero means data was pruned.

Pit three: the variables did not resolve

This is the pit I fall into most. Panels on a Grafana dashboard reference variables such as $instance, $host, $job, and when a variable fails to refresh or is undefined, the PromQL has the variable replaced with an empty string and the whole query stops matching anything.

How to pin it down:

  1. Open any panel in edit mode and look at the query for $-prefixed variables.
  2. Check that the variable actually resolved to a value. In the Variables section, open the variable and read its values list.
  3. If the list is empty, look at the variable query type:
  4. query — the variable itself runs a PromQL to pull labels, e.g. label_values(up, instance). If that query returns nothing, every label it feeds is empty and every panel that uses it is empty.
  5. custom — manually entered values; confirm the right entry is selected.
  6. constant — a fixed string; usually fine.

Fix: set refresh to on dashboard load, or reorder the dashboard so variables resolve before the panels. I once had an ops teammate set a constant variable job to the wrong spelling, and every one of the twenty panels on the board went blank until he fixed the constant.

Pit four: a unit misalignment pins the curve to the top or bottom

A curve that looks misaligned but actually has data is, almost without exception, a unit problem. The Units setting decides how the y-axis interprets the number. Typical wrong pairings:

Unit you assumed Real value magnitude Result
percent (1-100) bytes (gigabytes) curve pinned to the top, y-axis at 1e9
bytes percent (1-100) curve pinned to the bottom, invisible
seconds milliseconds timeline stretched a thousand times

To pin it down: open the panel, go to Standard options and Unit, and compare it against the real magnitude of the metric (run the metric in Prometheus /query and read the value).

I once set the unit of rate(node_disk_bytes_written[5m]) to percent, and the y-axis ran to 1e12 while the curve sat glued to the zero line. Change the unit to bytes and the curve came back instantly.

Pit five: a query-semantics misalignment makes numbers disagree

When a Grafana panel number does not match a direct Prometheus query, the usual causes fall into three groups.

5.1 A missing rate or sum

The panel writes node_cpu_seconds_total, which is a cumulative counter, while the direct Prometheus query uses rate(node_cpu_seconds_total[5m]), the per-second delta. The two have completely different meanings, so the numbers cannot agree.

5.2 Different aggregation functions

One side uses avg and the other uses sum, so the magnitudes differ by ten to a hundred times.

5.3 A missing by label

sum(rate(node_cpu_seconds_total[5m])) and the same expression with by (instance) return different row counts, so Grafana draws a single line while the direct query returns a bundle.

Cross-check:

# copy the panel query verbatim and run it in Prometheus
curl -s "http://localhost:9090/api/v1/query" --data-urlencode 'query=<panel query>'
# compare the two result sets and find the semantic gap

I hit one where a Grafana panel used avg but the alerting script used max, and the two disagreed by three times. Aligning the functions made them match.

Pit six: a panel-mapping overlap stacks the curves

A single panel that should show many instances defaults to splitting by series. If the labels are not split correctly, the curves stack on one another and the chart looks like a single line.

To pin it down: look at the panel Transformations and see whether a Group by is applied, and whether the Legend is set to {{instance}}. If the legend is wrong, the chart draws only one line.

# legend template example
{{instance}} - {{job}}

Set the legend correctly and the curves separate.

A single card

Symptom Pit One cross-check
Whole board blank data source run up in the data source page
One panel blank variable see what a $ variable resolves to in the panel query
Curve only covers the last N hours time range/retention /api/v1/query_range start point
Curve pinned top or bottom unit is the panel Unit the real magnitude of the metric
Numbers disagree query semantics paste the panel query into Prometheus
Curves overlap panel mapping is the Legend set to {{instance}}

One question I ask before touching a panel

Before I change anything I ask myself: "Is this curve 'no data' or 'wrong configuration'?" The first points at the data source and retention. The second is the panel itself. The two paths do not overlap, so getting the direction right up front saves real time.

I also ask one more question: "Where did this dashboard come from?" If it was cloned from another environment, the variables, the data source UID, and the time offsets may all be stale — and I check "are all the variables defined and is the data source UID correct" before anything else. Most dashboards that suddenly go blank are a migration that was not finished, not a data problem.