Grafana Shows 'No Data': How to Track Down Why
A Grafana panel saying 'No data' almost never means the data is missing — it means the query, the time range, or the data source isn't lined up with it. Here's the order to check.
Your dashboard loads, but the panel just says No data. The metric exists, Prometheus is scraping — yet the graph is empty. "No data" isn't an error; it means this query, over this time range, against this data source returned zero series. Work through these in order and you'll find which of those three is off.
Step 1: Widen the time range
The single most common cause. If the panel's range is "Last 5 minutes" but the target only started reporting a minute ago — or stopped ten minutes ago — there's nothing to plot. Set the range to Last 6 hours and see if data appears. If it does, your data is fine; the range was just wrong.
Step 2: Run the query in Explore
Click Explore (compass icon), pick the same data source, and paste the panel's query. Explore strips away all the panel's formatting so you see the raw result:
- Explore shows data → the problem is in the panel (transformations, field overrides, legend format, or the visualization type).
- Explore is also empty → the problem is the query or the data source. Continue below.
Step 3: Check the metric name and labels
In Explore, type just the bare metric name (no filters). Prometheus autocompletes real metric names — if yours doesn't appear, it's misspelled or the exporter never produced it. Then check your label filters:
http_requests_total{job="api"} # returns nothing if no series has job="api"
A label filter that matches nothing yields "No data". Remove the filters one at a time until data returns — the last one you removed was wrong.
Step 4: Verify the data source
At the top of the panel editor, confirm the data source dropdown points at the Prometheus you think it does. Dashboards imported from elsewhere (or using a $datasource variable) often point at a data source that doesn't exist or is misconfigured. Go to Connections → Data sources → your Prometheus → Save & test — it must say "Data source is working".
Step 5: Is the data actually there?
If Explore against a known-good metric like up is also empty, Prometheus itself isn't returning anything to Grafana — check the Prometheus URL in the data source (from Grafana's point of view, e.g. http://prometheus:9090 on a shared Docker network) and that Prometheus has targets UP.
The checklist
- Widen the time range (Last 6 hours) — the #1 cause.
- Paste the query into Explore — isolates panel bugs from query bugs.
- Type the bare metric name; fix spelling and over-tight label filters.
- Confirm the panel's data source and run Save & test.
- Query
up— if that's empty too, the data source URL/connection is the problem.
Frequently Asked Questions
Why does Grafana say 'No data' when Prometheus has the metric?
Usually the panel's time range doesn't overlap the data, or a label filter matches no series. Paste the query into Explore and widen the range — if data shows there, the panel's range or transformations are the issue.
How do I test if my Grafana data source works?
Go to Connections → Data sources, open the data source, and click Save & test. It should report "Data source is working". If not, the URL is wrong or unreachable from Grafana's container/host.
What's the fastest way to tell if it's the query or the panel?
Use Explore. It runs the raw query with no panel formatting. Data in Explore but not the panel means the panel config is the culprit; empty in both means the query or data source is.
Stop reading, start building
This pairs with a hands-on BytExplorer course — do it on your own machine and actually keep the skill.