Skip to content

Commit bb90e39

Browse files
JV0812jpipkin1
andauthored
Dashboard Scope based variable info added (#5084)
* Dashboard Scope based variable info added * spellcheck fix * minor fixes * note added * Update docs/dashboards/filter-template-variables.md * Update docs/dashboards/filter-template-variables.md * Update docs/dashboards/filter-template-variables.md * Update docs/dashboards/filter-template-variables.md * Update docs/dashboards/filter-template-variables.md * Update docs/dashboards/filter-template-variables.md Co-authored-by: John Pipkin (Sumo Logic) <[email protected]> * Update docs/dashboards/filter-template-variables.md * Update filter-template-variables.md * added the release note * minor fix * Update 2025-06-18-dashboards.md * Update 2025-06-18-dashboards.md --------- Co-authored-by: John Pipkin (Sumo Logic) <[email protected]>
1 parent fd32325 commit bb90e39

File tree

7 files changed

+41
-2
lines changed

7 files changed

+41
-2
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Scope-Based Variable (Dashboards)
3+
image: https://help.sumologic.com/img/sumo-square.png
4+
keywords:
5+
- dashboard
6+
- scope-based-variable
7+
hide_table_of_contents: true
8+
---
9+
10+
import useBaseUrl from '@docusaurus/useBaseUrl';
11+
12+
We’re excited to introduce a new dashboard variable type: Scope-Based Variables. Scope-Based Variables act as log filters that can be automatically applied to all or selected panels within a dashboard. This helps you to easily filter data across multiple panels without needing to manually edit each panel’s query to accept the variable. [Learn more](/docs/dashboards/filter-template-variables).

docs/dashboards/filter-template-variables.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,21 @@ The web interface autocomplete feature for log search variables has the follow
2121
* It is updated every night for the last 24 hours starting from 10PM PT to the previous day at 10PM PT. 
2222
* Only dashboards that were viewed in the last 3 days are updated.
2323
* Up to 10,000 log values and 1,000 metric values are displayed.
24-
* Values for template variables are based on the time range of the Dashboard.
24+
* Values for template variables (except Scope Based Variable) are based on the time range of the dashboard.
25+
* New panels added to the dashboard will automatically adopt any existing Scope-based Variable to it.
2526

2627
## Show and hide variables option
2728

2829
In the Dashboard top menu bar, click the filter icon to show the variables option. The filter icon allows you to toggle if the variables option is displayed or hidden.<br/><img src={useBaseUrl('/img/dashboards/filter-template-variables/Show-and-Hide-filters.png')} alt="Show and Hide filters" style={{border: '1px solid gray'}} width="400" />
2930

3031
## Create a template variable
3132

32-
There are three types of template variables you can use as a dashboard filter:
33+
There are four types of template variables you can use as a dashboard filter:
3334

3435
* Custom List - a custom set of options
3536
* Metrics Metadata Search - metrics metadata based options 
3637
* Log Search - logs query based options
38+
* Scope-based Variable - define scope variables to automatically apply to all log queries
3739

3840
### Add a Custom List variable
3941

@@ -46,6 +48,7 @@ To add a Custom List variable to a dashboard, do the following:
4648
1. In the **Create Template Variable** panel, enter a unique **Variable Name**. Spaces and special characters, with the exception of an underscore (_), are not allowed in value names.<br/><img src={useBaseUrl('img/dashboards/filter-template-variables/Create-Template-Variable-dialog.png')} style={{border:'1px solid gray'}} alt="Create-Template-Variable-dialog" width="800"/>
4749
1. Select **Custom List** as the **Variable Type**.
4850
1. **List Items** are your variable values. Use a comma separated list for variable options, separating individual options with a comma. For example, `small, medium, large`.
51+
1. (Optional) **Include the option to select all values (\*)** will be selected by default. This includes a wildcard asterisk (\*) in the available options.
4952
1. (Optional) Provide a **Default Value** for the variable.
5053
1. Click **Create Template Variable** to apply the variable to the dashboard. 
5154

@@ -61,6 +64,7 @@ To add a Metrics Metadata Search variable to a dashboard, do the following:
6164
1. Select **Metrics Metadata Search** as the **Variable Type**.
6265
1. The **Fields (key)** is the metadata field you want to use as the filter.
6366
1. (Optional) **Filters** allow you to filter the scope of your data before choosing the field you want to use. Click in the **Filter** input, begin typing, and choose a filter from the pop-up list. A list of valid values appears. Select a value for the filter, and add other filters as needed.
67+
1. (Optional) **Include the option to select all values (\*)** will be selected by default. This includes a wildcard asterisk (\*) in the available options.
6468
1. (Optional) Provide a **Default Value** for the variable.
6569
1. Click **Create Template Variable** to apply the variable to the dashboard.
6670

@@ -76,6 +80,29 @@ To add a Logs Search variable to a dashboard, do the following:
7680
1. Select **Logs Search** as the **Variable Type**.
7781
1. Click in the **Query** field and begin typing your query. Select valid options from the pop-up list as they appear until your query is complete.
7882
1. The **Key** is the metadata field you want to use as the filter. Once a Key is selected the Preview table will show example values based on the query running for the last 15 minutes.
83+
1. (Optional) **Include the option to select all values (\*)** will be selected by default. This includes a wildcard asterisk (\*) in the available options.
84+
1. (Optional) Enter a **Default Value** for the variable.
85+
1. Click **Create Template Variable** to apply the variable to the dashboard.
86+
87+
### Add a Scope-based Variable
88+
89+
With a Scope-based Variable, you can define a variable that automatically applies to all log queries within the scope of the dashboard or panels. By setting a key while creating the scope variable, you can select values to enable simple filtering for the dashboard. Additionally, you can specify which panels the scope variable applies to for more granular control.
90+
91+
:::info
92+
- The fields in the Scope-based Variable are independent of dashboard and panel time range.
93+
- Fields in the Scope-based Variable will also contain the FER field keys.
94+
:::
95+
96+
To add a Scope-based Variable to a dashboard, do the following:
97+
98+
1. In the Dashboard top menu bar, click the filter icon to show the variables option. The filter icon allows you to toggle if the variables option is displayed or hidden.<br/><img src={useBaseUrl('img/dashboards/filter-template-variables/Show-and-Hide-filters.png')} style={{border:'1px solid gray'}} alt="Show-and-Hide-filters" width="250"/>
99+
1. In the Dashboard top menu bar, click the **plus (+) icon**. The **Create Template Variable** panel appears.<br/><img src={useBaseUrl('img/dashboards/filter-template-variables/create-dashboard-filter.png')} style={{border:'1px solid gray'}} alt="create-dashboard-filter" width="800"/>
100+
1. In the **Create Template Variable** panel, enter a unique **Variable Name**. Spaces and special characters, with the exception of an underscore (_), are not allowed in value names.<br/><img src={useBaseUrl('img/dashboards/filter-template-variables/scope-based-variable.png')} style={{border:'1px solid gray'}} alt="scope-based-variable" width="800"/>
101+
1. Select **Scope-based Variable** as the **Variable Type**.
102+
1. The **Filds (key)** is the metadata field you want to use as the filter. Once a Key is selected the Preview table will show example values based on the query running for the last 15 minutes.
103+
1. (Optional) **Display all values available** will be selected by default. If you want to specify any values, deselect this option and enter the required value(s) in section below.
104+
1. (Optional) **Apply filter to all panels in dashboard** will be selected by default. If you want to apply this variable to secleted panel, deselect this option and select the panels from the dropdown. You can also click on <img src={useBaseUrl('img/dashboards/filter-template-variables/preview-the-panels.png')} style={{border:'1px solid gray'}} alt="preview-the-panels" width="30"/> to preview and select the dashboard panel to which you want to apply this variable.
105+
1. (Optional) **Include the option to select all values (\*)** will be selected by default. This includes a wildcard asterisk (\*) in the available options.
79106
1. (Optional) Enter a **Default Value** for the variable.
80107
1. Click **Create Template Variable** to apply the variable to the dashboard.
81108

-7.32 KB
Loading
25.6 KB
Loading
-3.92 KB
Loading
4.3 KB
Loading
188 KB
Loading

0 commit comments

Comments
 (0)