Dashboard Scope

Dashboard and panel scope defines what data is valid for aggregation and display within the dashboard. The scope can be set at a dashboard-wide level, or overridden for individual panels, by any user type except for View Only users.

The current scope is displayed in the top left-hand corner of the module screen:

For more information on how scopes work, refer to the Grouping, Scoping, and Segmenting Metrics documentation.

Configure Dashboard Scope

To configure the scope of an existing dashboard:

  1. From the Dashboard module, select the relevant dashboard from the dashboard list.

  2. Click the Edit Scope link in the top right of the module screen:

  3. Open the first level drop-down menu.

  4. Select the labels either by clicking the desired label, or searching for the label, then clicking it.

  5. Select one or more labels values from the drop-down.

    Scope editor restricts the scope of the selection for subsequent filters by rendering values that are specific to the selected labels. For example, if the value of the kube_namespace_name label is kube-system, the values of the subsequent label, container_name will be filtered by kube-system. This means the containers rendered for filtering are only those that are part of the kube-system namespace.


  6. Optional: Dashboard Templating.

    Dashboard scope values can be defined as variables, allowing users to create a template, and use one dashboard for multiple outputs.

  7. Optional: Add additional label/value combinations to further refine the scope.

  8. Click Save to save the new scope, or click Cancel button to revert the changes.

    To reset the dashboard scope to the entire infrastructure, or to update an existing dashboard’s scope to the entire infrastructure, click Clear All.

Configure Panel Scope

To configure the scope of an existing dashboard panel:

  1. From the Dashboard module, select the relevant dashboard from the dashboard list.

  2. Click Edit (pencil) icon:

  3. From the query field associated with the metric, click Scope.

  4. Select the labels either by clicking the desired label, or searching for the label, then clicking it.


  5. Select one or more label values.

  6. Optionally, apply panel scope to all the queries.

  7. Click Save to confirm the changes.

Using $__scope

The Scope variable is indicated by $_scope and can be used in PromQL queries. The variable represents a scope that you have already defined. When you insert the $_scope variable to a PromQL expression, the selected scope is applied to the query you have built. The scope variable allows you to apply the whole scope to the query, instead of applying each scope variable individually.

If you select Entire Infrastructure as the scope, no scope will be applied.



Last modified September 23, 2022