Grafana Dashboard No Data — Data Source Connection and Query Errors
About Grafana Dashboard No Data
Fix Grafana dashboards showing 'No data' when panels cannot retrieve metrics from data sources like Prometheus, InfluxDB, or Elasticsearch. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.
Here are the key things to understand: Grafana visualizes data from configured data sources using dashboard panels with queries. No data can mean: data source unreachable, query returns empty results, or time range has no data. Each panel has its own query that can be inspected and debugged independently. Common data sources: Prometheus, InfluxDB, Elasticsearch, MySQL, PostgreSQL, CloudWatch. The time range selector affects all panels — data may exist outside the selected range. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.
The most common reasons this occurs include: Data source connection failed — Grafana cannot reach Prometheus, InfluxDB, or other backend. PromQL, InfluxQL, or other query syntax error returning empty results. Time range selector set to a period where no data exists. Metric name changed or label values differ from what the dashboard query expects. Identifying the root cause is the first step toward finding the right solution.
To resolve this, follow these recommended steps: Test data source connection: Configuration > Data Sources > select source > click 'Test' button. Inspect panel query: click panel title > Edit > check the query and preview results. Expand time range: set to 'Last 24 hours' or 'Last 7 days' to see if data exists in a broader window. Check metric names: open Prometheus/InfluxDB directly and verify the metric exists with expected labels. Use the Query Inspector: panel Edit > Query Inspector to see the raw query and response. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.
This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.
Quick Answer
How do I find the correct metric name?
In Grafana's Explore mode, select the data source and use the metric browser to search for available metrics. For Prometheus, browse to /api/v1/label/__name__/values for a complete list of metric names.
Overview
Fix Grafana dashboards showing 'No data' when panels cannot retrieve metrics from data sources like Prometheus, InfluxDB, or Elasticsearch.
Key Details
- Grafana visualizes data from configured data sources using dashboard panels with queries
- No data can mean: data source unreachable, query returns empty results, or time range has no data
- Each panel has its own query that can be inspected and debugged independently
- Common data sources: Prometheus, InfluxDB, Elasticsearch, MySQL, PostgreSQL, CloudWatch
- The time range selector affects all panels — data may exist outside the selected range
Common Causes
- Data source connection failed — Grafana cannot reach Prometheus, InfluxDB, or other backend
- PromQL, InfluxQL, or other query syntax error returning empty results
- Time range selector set to a period where no data exists
- Metric name changed or label values differ from what the dashboard query expects
Steps
- 1Test data source connection: Configuration > Data Sources > select source > click 'Test' button
- 2Inspect panel query: click panel title > Edit > check the query and preview results
- 3Expand time range: set to 'Last 24 hours' or 'Last 7 days' to see if data exists in a broader window
- 4Check metric names: open Prometheus/InfluxDB directly and verify the metric exists with expected labels
- 5Use the Query Inspector: panel Edit > Query Inspector to see the raw query and response