Grafana Cloud Enterprise Open source

Note

Cross-dashboard variables is currently in public preview. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.

To use this feature, enable the grafana.dashboardGlobalVariables feature toggle in your Grafana configuration file or contact Support.

Unlike variables that are specific to the dashboard in which you build them, you can create cross-dashboard variables for use across multiple dashboards. These variables help ensure consistent naming across your organization and eliminate the need to re-create the same variables every time you add a new dashboard.

You can scope cross-dashboard variables in two ways:

  • Globally: Available to all dashboards in the organization.
  • By folder: Available only to the dashboards in the same folder as the variable.

The Dashboards > Variables page lists cross-dashboard variables, showing which ones are available globally or by folder. In the following image, there are variables in “Core metrics” and “Grafana Cloud” folders and then a number of variables that aren’t in any folders; these ones are global:

Cross-dashboard variables page

When you add cross-dashboard variables to a dashboard, only the ones that share the same scope as your dashboard are available for you to select.

For example, in the preceding image, there are two variables in the “Core metrics” folder. The following image shows a dashboard in the “Core metrics” folder. As a result, the variables in the “Core metrics” folder are available to that dashboard, as well as all the global variables:

Available cross-dashboard variables in dashboard sidebar

Variables in other folders aren’t available to that dashboard.

Create cross-dashboard variables

To create cross-dashboard variables, follow these steps:

  1. Navigate to Dashboards > Variables.

  2. Click + New variable.

  3. Set the following general variable properties:

    OptionDescription
    FolderSet the availability of the variable. To allow the variable to be used in all of the organization’s dashboards, select Dashboards.
    Variable typeChoose a variable type.
    NameEnter a name for the variable.
    Label(Optional) Enter the display name for the variable drop-down list. If you leave this empty, then the variable name is used.
    Description

    (Optional) Enter a description of the variable. When you add a description, an info icon appears next to the variable name on the dashboard. Hover your cursor over the icon to display the description.

    Descriptions support links. You can use Markdown-style links like [link text](https://example.com), or paste bare URLs like https://example.com. Only http and https URLs render as clickable links—other protocols display as plain text.

    DisplayChoose where the variable displays:
    • Above dashboard: The variable drop-down list displays above the dashboard with the variable