DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
FREEDOM251

Freedom251 › Blog › dashboards

How to Add a Prometheus Dashboard to Grafana (Import, Build, and Fix Empty Panels)

By Freedom251 Team · · 13 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To add a Prometheus dashboard to Grafana, first make Prometheus a working, reachable Grafana data source. Then import a dashboard JSON file, Grafana.com URL or ID, or pasted JSON and map its Prometheus reference to that data source. If no existing dashboard fits, create panels yourself with PromQL queries. Empty panels almost always come from an unreachable URL, an incorrect data-source mapping, a query that does not match your metrics, or a time range with no samples.

What you need before adding a dashboard

A Grafana dashboard is a collection of panels. Each panel asks a data source for data, runs a query, and renders the result as a graph, table, gauge, stat, or another visualization. Importing the dashboard does not install Prometheus, create metrics, or repair an unavailable data source.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before opening Grafana, verify these prerequisites:

  • Prometheus is running and collecting data.
  • The metrics expected by the dashboard exist in Prometheus. A dashboard built for Node Exporter, for example, needs the Node Exporter metric series it references.
  • Grafana can reach the Prometheus HTTP endpoint from the machine, virtual network, or container where Grafana runs.
  • You have organization-administrator rights to configure data sources in the Grafana interface, or you can provision the source with YAML or Terraform.

For a local installation on the same host, a typical endpoint is http://localhost:9090. That address is only an example: use the actual protocol, hostname, port, and path for your Prometheus deployment.

Check Prometheus before troubleshooting Grafana

Open Prometheus’s web interface or query endpoint and run a simple expression such as up. You should see time series for targets that are currently reachable. If the expected series are absent, fix scraping, exporter installation, or Prometheus configuration first. Grafana cannot display samples that Prometheus never collected.

Use the same check for a dashboard’s main dependency. If the dashboard expects host metrics, verify that the relevant Node Exporter series appear, not merely that Prometheus itself responds. A healthy Prometheus process can still be missing an exporter, scraping the wrong target, or using labels that differ from those expected by the dashboard.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add Prometheus as a Grafana data source

Grafana includes native Prometheus support; a separate Grafana plugin installation is not required. Navigation labels vary slightly by Grafana release, so you may see Connections followed by Add new connection, or a direct Data sources entry.

  1. Sign in to Grafana with an organization-administrator account.
  2. Open Connections and choose Add new connection. If your version shows Data sources, open that instead.
  3. Search for and select Prometheus.
  4. Enter the Prometheus server URL. For a same-host local setup this might be http://localhost:9090; in another deployment, enter the address Grafana can actually resolve and reach.
  5. Save the configuration and use Grafana’s connection test. A successful test confirms that Grafana can contact the endpoint; it does not guarantee that every dashboard query will return a series.

Record the data-source name you choose. The name is useful when you later inspect imported mappings, panel editors, variables, or annotation queries. If several Prometheus sources exist, use a descriptive name that distinguishes environments, such as a production source from a development source, while keeping the endpoint and access policy clear to administrators.

Use the correct URL in containers

localhost refers to the current network namespace. When Grafana runs in a container, http://localhost:9090 points to that Grafana container, not automatically to the host and not to a separate Prometheus container. If both services are on a container network, use the Prometheus service name and port, such as a hostname exposed by your compose or orchestration configuration. If Prometheus runs elsewhere, use a routable address and ensure firewall and network policy rules permit the connection.

This distinction explains a common failure pattern: Prometheus works when opened from the host browser, but Grafana’s test fails. The browser and the Grafana server are making different network requests. Test from the Grafana runtime’s network path, and check DNS resolution, port exposure, protocol, and any reverse-proxy path required by your deployment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Provision the source instead of using the UI

When UI configuration is restricted, provision the Prometheus data source with Grafana’s YAML provisioning mechanism or manage it through Terraform. The same reachability requirement applies: provisioning can create the configuration, but it cannot make an invalid hostname or blocked network path work.

Provisioning is also useful when several Grafana instances need the same source definition. Keep the endpoint and source name consistent with the dashboard definitions you distribute, then still verify the connection in each environment. A provisioned source can exist successfully while a firewall, DNS rule, or container network prevents queries from reaching Prometheus.

Import an existing Prometheus dashboard

Once the data source is tested, import a dashboard that matches your exporters and metric names.

  1. Open Dashboards, select New, and choose Import dashboard.
  2. Provide one of the accepted formats: upload a dashboard JSON file, enter a Grafana.com dashboard URL or numeric ID, or paste the JSON text into the import field.
  3. Review the proposed dashboard name, folder, UID, and any metric-prefix or variable options shown by the importer.
  4. When Grafana displays data-source mappings, map the dashboard’s Prometheus reference to the Prometheus data source you just configured.
  5. Choose Import. Open the resulting dashboard and check several panels across the selected time range.

The URL and ID methods retrieve a published dashboard definition; they do not supply the metrics themselves. A JSON file or pasted definition behaves the same way: it describes panels, queries, variables, and layout, while your Grafana instance supplies the data source and your Prometheus installation supplies the samples.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why data-source mapping matters

Dashboard JSON stores references to data sources, but a reference from another Grafana instance may not have the same name or UID in yours. During import, Grafana lets you map each imported reference to a data source that exists in your environment. If you skip or misapply that mapping, the dashboard can open normally while its panels have no usable query source.

Map every Prometheus reference shown by the importer, not only the first visible panel. Variables, hidden rows, and annotations can have their own references. After importing, open a few representative panels and confirm that their selected source is the intended Prometheus instance. If you later clone the dashboard into another organization, repeat the mapping because source identifiers are environment-specific.

Review a community dashboard before production use

Grafana’s dashboard library includes official and community dashboards. Treat a community dashboard as configuration that needs inspection, not as a guarantee that it matches your installation. Before granting broad access or relying on its alerts, inspect:

  • PromQL expressions and recording-rule names.
  • Template variables and their label filters.
  • Required exporters, agents, and metric names.
  • Panel transformations, time ranges, and alert behavior.
  • Any plugin or visualization requirement that your Grafana version does not provide.

A dashboard designed for one exporter version may show empty panels or misleading values when the same concept has different metric names or labels in your environment. Check the dashboard description and its variable defaults, then compare a few expressions with the series visible in Prometheus before treating the imported view as authoritative.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Validate the imported dashboard immediately

Start with a time range in which you know Prometheus has samples. Confirm that template variables populate, select a specific target when a variable is available, and inspect both a simple panel and a calculated panel. A single working panel proves that the source is reachable, but it does not prove that every exporter, label, or recording rule required by the dashboard exists.

Keep the original imported dashboard until you understand its dependencies. Make a copy for local changes, document any changed queries, and avoid overwriting a working version when testing an updated JSON definition. This makes it easier to distinguish an import problem from a later query or configuration change.

Build a Prometheus dashboard manually

Import is fastest when a suitable dashboard exists. Building manually gives you control over queries, labels, units, and panel layout.

  1. Open Dashboards > New > New Dashboard.
  2. Select Add visualization or the equivalent add-panel control.
  3. Choose the Prometheus data source.
  4. Enter a PromQL expression in the query editor. You can type the expression directly or use the editor’s metric and label controls.
  5. Run or refresh the query and confirm that the returned series cover the dashboard’s time range.
  6. Select a visualization. Grafana commonly starts a Prometheus panel as a time-series graph, but you can choose a stat, gauge, table, heatmap, or another available visualization.
  7. Configure units, legends, thresholds, field overrides, and transformations appropriate to the result.
  8. Save the panel and then save the dashboard, giving it a clear name and selecting a folder.

Choose queries that match the panel’s purpose

A panel needs a query before it can render a meaningful visualization. PromQL is determined by the Prometheus data source, so effective dashboard work requires understanding metric names, labels, aggregation, rates, and time windows. A raw counter may need a rate calculation for a time-series panel; a fleet total may need aggregation across instance labels. Use the metric names and labels that actually exist in your Prometheus installation rather than copying expressions from an unrelated exporter.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Begin with the simplest expression that proves the metric exists, then add label matchers, aggregation, or a rate calculation one change at a time. If a query becomes empty after adding a matcher, that label value is not present in the selected time range. If several targets appear as separate lines when you need one fleet value, aggregate across the appropriate instance label. Keep the panel title and unit aligned with what the query actually returns so a correct result is not misread.

Validate variables and time ranges

Dashboard variables often populate drop-downs from label values. If a variable query references a label that does not exist, panels depending on that variable can return no series. Start with a short, known-good time range, then widen it after confirming current samples. Check the dashboard’s timezone and refresh interval when comparing results with Prometheus directly.

When a variable has an “all” option, verify that the resulting matcher does not exclude every series. Test the panel with a concrete target or job first. A refresh interval that is shorter than the scrape cadence may briefly show unchanged data, while a range with no samples can make a valid query look broken.

Add deployment or alert context with annotations

Annotations place event markers over dashboard graphs, making deployments, threshold crossings, or other operational events visible alongside metric changes. They are optional; ordinary panels do not need them.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Edit the dashboard and open its annotation settings.
  2. Add an Annotation query.
  3. Select the Prometheus data source.
  4. Enter a PromQL expression that returns the event series you want to mark.
  5. Set the minimum step and map fields such as the event time, title, and description when those options are available.
  6. Test the annotation query, save it, and then save the dashboard.

Annotations require a configured, readable Prometheus source and event metrics that contain usable timestamps or values. If the event series does not exist, the dashboard can still display ordinary panels but will have no markers. Keep annotation queries separate from the core panels while diagnosing a dashboard so an unavailable event series does not obscure the fact that the metric panels themselves work.

Grafana Cloud or self-managed Grafana?

Both deployment models support importing dashboard JSON, URLs, and IDs. The practical difference is who operates Grafana and how it reaches Prometheus.

Decision factor Self-managed Grafana Grafana Cloud
Operations You install, upgrade, secure, back up, and monitor Grafana. The service provider hosts and maintains the Grafana platform.
Network path to Prometheus Grafana can often reach a private Prometheus directly on the same network. Your Prometheus endpoint must be reachable through an approved network path, or you must use a private data-source connection option where available.
Dashboard import Import JSON, a URL, or an ID from the Dashboards menu. Use the same import formats and map references to sources in the cloud organization.
Control and governance You retain local infrastructure and configuration control. You reduce platform maintenance but work within the hosted service’s network, access, and version controls.
Compatibility considerations Plugin, Grafana-version, and data-source compatibility remain your responsibility. Imported dashboards still require compatible queries, visualizations, and data-source mappings.

Choose self-managed Grafana when direct access to private infrastructure and local governance are priorities. Choose Grafana Cloud when reducing Grafana platform operations is more important and you can provide an acceptable path from the hosted service to Prometheus. Hosted Grafana does not remove the need to verify metric names, permissions, source mappings, or network reachability.

Operational cost follows the same distinction: self-managed deployments consume your team’s time and infrastructure for installation, upgrades, backups, and security, while a hosted service shifts much of that platform work to the provider. The appropriate choice depends on governance and connectivity requirements rather than on the dashboard import steps, which are substantially the same.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Fix a Grafana dashboard that shows no data

Work from the outside in: establish connectivity, verify the selected source, then inspect queries and metrics.

Symptom Likely cause What to check
Connection refused or data-source test fails Prometheus is stopped, the URL is wrong, or traffic is blocked. Confirm the Prometheus process, port, protocol, DNS name, firewall rules, and reachability from the Grafana runtime.
Works on the host but fails in a container localhost points to the wrong container. Use the Prometheus service hostname or another address reachable on the container network.
Dashboard imports but every panel is empty The imported Prometheus reference was not mapped correctly. Reopen the import or dashboard settings and ensure every Prometheus reference points to the configured source.
Only some panels are empty A panel query, variable, label, or exporter requirement differs from your setup. Open the panel editor, run its PromQL directly, inspect variables, and compare required metric names with the series in Prometheus.
Data appears only after changing the time range The selected interval contains no samples or the dashboard uses an unsuitable refresh window. Choose a range in which Prometheus has data, verify scrape intervals, and then adjust the default range.
Permission error while adding the source The account lacks organization-administrator rights. Use an administrator account or provision the data source with YAML or Terraform.

A reliable diagnostic sequence

  1. Query up in Prometheus and confirm that expected targets are producing samples.
  2. Run Grafana’s data-source test and correct the URL or network path if it fails.
  3. Open the panel’s query inspector or editor and identify the exact PromQL expression being sent.
  4. Run that expression in Prometheus, checking metric names, label matchers, and the time range.
  5. Confirm that dashboard variables resolve to values and are not filtering every series out.
  6. Check whether the dashboard expects a particular exporter, recording rule, or metric prefix that you do not have.

If the data-source test succeeds but a direct query fails, stop changing network settings and focus on the expression, labels, variables, or missing series. If the same expression works in Prometheus but not in a panel, compare the panel’s selected source, time range, query mode, and any transformations. If only annotations fail, investigate the event metric separately; ordinary panels do not depend on annotation results.

Save, share, and maintain the dashboard

Save both changed panels and the dashboard itself. Put related dashboards in a folder with a descriptive name, and document the Prometheus jobs or exporters they require. When importing updates, compare the new JSON with your customized version instead of overwriting working panels blindly. Re-test data-source mappings after moving a dashboard between Grafana organizations, servers, or cloud and self-managed environments.

For production use, review access permissions, back up dashboard definitions, and test queries after upgrading Grafana, Prometheus, or exporters. A dashboard is only as reliable as the metrics and labels behind it; keeping those dependencies documented prevents an apparently broken visualization from becoming an extended outage investigation.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Include the expected source name, exporter dependencies, important variables, default time range, and any recording rules in the dashboard’s operational notes. That small amount of documentation helps the next administrator distinguish a missing metric from a Grafana rendering problem and makes migration between environments more predictable.

Frequently Asked Questions

Can I import a dashboard without installing Prometheus?

You can import the dashboard definition, but its panels need a reachable Prometheus-compatible data source and matching metrics to display values.

How do I connect Prometheus to Grafana?

Add a native Prometheus data source in Grafana, enter the endpoint reachable from Grafana, save it, and run the connection test. In a container, use the Prometheus service hostname rather than assuming localhost is the host.

Why does a dashboard work in Prometheus but not in Grafana?

Grafana may be using an unreachable URL, the wrong imported data-source mapping, a different time range, or a query and label set that does not match the dashboard’s expected exporter.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I import a Grafana dashboard by ID?

Open Dashboards, choose New and Import dashboard, enter the Grafana.com dashboard ID or URL, review the proposed settings, map its Prometheus reference to your configured source, and select Import.

Do I need a Grafana plugin for Prometheus?

No. Prometheus support is built into Grafana; configure the data source and provide a reachable Prometheus endpoint.

Why are only some imported panels empty?

Those panels may use a missing exporter metric, recording rule, label, variable, or incompatible query. Open each panel, run its PromQL directly, and compare the required series with what Prometheus exposes.

Can I use Grafana Cloud instead of installing Grafana myself?

Yes. Grafana Cloud supports the same dashboard import formats, but its hosted environment needs an approved network path to Prometheus, such as a reachable endpoint or an available private data-source connection option.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do I need administrator access to add Prometheus?

Organization-administrator permissions are required for UI data-source configuration. If you do not have them, an administrator can provision the source with YAML or Terraform.

What is the difference between a dashboard panel and an annotation?

A panel queries Prometheus to render a visualization. An annotation query adds event markers such as deployments or threshold events and is optional; it requires separate event metrics and read access.

The Bottom Line

Make Prometheus reachable and verify its metrics first. Add it as Grafana’s data source, import a JSON, URL, or ID dashboard and map every Prometheus reference, or build panels with PromQL yourself. If panels are empty, check connectivity, mappings, variables, queries, exporter metrics, and the selected time range in that order.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

dashboardsGrafanaMonitoringobservabilityPrometheusPromQL

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.