I am trying to create a dashboard where dashboard variables can pull and combine values from multiple datasources. Currently, Grafana variables require a single datasource for query variables, which prevents me from:
-
Creating a variable that represents the union of values from multiple datasources (e.g.,
$data1from datasource A and$data2from datasource B). -
Using a single variable as a filter across panels where each panel may query a different datasource.
-
Providing an “Include All” or combined selection behavior for multiple datasources.
My use case:
-
I have multiple clusters, each with its own datasource (Prometheus, Azure Monitor Workspace, etc.).
-
I want a variable (e.g.,
namespace) that aggregates values across all clusters. Or even a solution that inspects all data sources and determines the appropriate namespaces using only the cluster variable. -
Panels select the appropriate datasource dynamically based on cluster selection.
-
Currently, this setup is not possible, because variable queries can only target one datasource.
Practical case:
I currently have three variables: datasource, cluster, and namespace. I want to remove the datasource variable. I can convert cluster into a custom variable, but then the namespace variable would need to search across all data sources and query them based on the selected cluster value.
Questions / requests:
-
Is there a supported method to create a variable that merges values from multiple datasources?
-
If not, please consider this as a feature request: allow variables to query multiple datasources and provide combined “Include All” behavior.
-
Any recommended workarounds or best practices for multi-datasource variables in dashboards would be appreciated.
Thank you for your time and support.

