Share query results with another panel
Grafana let you use the query result from one panel for any other panel in the dashboard. Sharing query results across panels reduces the number of queries made to your data source, which can improve the performance of your dashboard.
The Dashboard data source lets you select a panel in your dashboard that contains the queries you want to share the results for. Instead of sending a separate query for each panel, Grafana sends one query and other panels use the query results to construct visualizations.
This strategy can drastically reduce the number of queries being made when you for example have several panels visualizing the same data.
To share data source queries with another panel:
-
Change the title to “Source panel”. You’ll use this panel as a source for the other panels.
-
Define the query or queries that you want share.
If you don’t have a data source available, use the Grafana data source, which returns a random time series that you can use for testing.
-
Add a second panel and select the Dashboard data source in the query editor.
-
In the Use results from panel list, select the first panel you created.
All queries defined in the source panel are now available to the new panel. Queries made in the source panel can be shared with multiple panels.
You can click on any of the queries to go to the panel where they are defined.
Related Grafana resources
Getting started with Grafana 8
Grafana 8.0 is here! Join us for a live walkthrough on how to get started using Grafana 8 and the Grafana 8 user interface while showing how to set up monitoring for a web service that uses Prometheus and Loki to store metrics and logs.
Unify your data with Grafana plugins: Splunk, MongoDB, Datadog, and more
Show how Grafana can be used to take data from multiple different sources and unify it, without disrupting the investments that are working today.
Getting started with Grafana Enterprise and observability
Join the Grafana Labs team for a 30-minute demo of how to get started with the Grafana Stack, so you can go from zero to observability in just a few minutes.