If you’ve used other observability tools, you might have encountered dashboard
variables by the names template variables.
$<NAME>, where <NAME> is the variable’s name.
Variables are most often used in queries but also work
in panel names and descriptions, and also in the content of
Markdown panels. Expressions also support variables.
For example, part of a panel’s query might match a service named production:
service and replace the string value
with $service:
$service in each panel by changing
that dashboard variable in one place, instead of editing each panel manually.
Dashboard variables can accept either user-defined text values
or offer a list of values, whether manually defined or
dynamically generated from labels or a query, for the user to select.
View dashboard variables
Dashboard variables add a dropdown selector to the dashboard’s header for each variable. To view a list of all of a dashboard’s variables:- Open the dashboard. You can view a list of all dashboards or select from a list of dashboards in a collection.
- On the dashboard, click Variables or click Settings > Variables.
Create a dashboard variable
To add a dashboard variable to a dashboard:- View the list of dashboard variables.
- In the Dashboard variables panel, click Add variable. By default, this creates a new text variable.
- To create a different variable type, make a selection from the Type menu.
- Enter the variable’s Name, which defines the name used to address the variable in a query or text.
- Enter a Display label.
- Enter a Description.
- Click Apply.
- Click Save to save the dashboard and new variable.
Configure a dashboard variable
To configure a dashboard variable:- View the list of dashboard variables.
- In the Dashboard variables panel, click Add variable. By default, this creates a new text variable.
- On the row of the variable you want to edit, click Edit variable.
- After configuring the variable, click Apply to confirm the changes.
Configure a text variable
In a text variable, the dashboard user can define the variable’s value by entering it into a text field. To configure a text variable:- Configure or create a dashboard variable.
- If the variable Type isn’t Text, click Type, then click Text.
- Optional: Set a Display label, which appears in the variable’s field instead of its name.
- Optional: Set a Description.
- Optional: Enter a Value for the template variable.
- After configuring the variable, click Apply to confirm the changes.
Configure a list variable
In a list variable, the dashboard user can define the variable’s value by selecting it from a list. To configure a list variable:- Configure or create a dashboard variable.
- If the variable Type isn’t List, select List from the Type dropdown.
- Select a Source:
- [Static] Custom list: Define the available options by entering them into the Values field.
- [Prometheus] Label values: Select a label name and Observability Platform adds the values of labels of the matching series to the list. You can filter the values by series by using PromQL time series selectors. If you don’t define any series selectors, Observability Platform defaults to using all series. To select from multiple series, click Add series selector.
- [Prometheus] Label names: Observability Platform adds all label names to the list. You can also filter these names by series using PromQL time series selectors.
- [Prometheus] PromQL result values: Enter a PromQL query and Observability Platform adds values from the result to the list. You can also filter the results by label name.
- [Logs] Logs field values: Enter the log field name you want to define a variable for.
- Optional: Filter the results further by entering a Regex filter, which includes only the results that match the expression.
- Optional: Set the variable’s Refresh toggle to define whether Observability Platform updates its list values On dashboard load or On time range change.
- Optional: To allow the user to select multiple values from the list, enable Select multiple values.
- Optional: To add an option to select all values from the list, enable Include “All” option. You can also define the regular expression representing all values by setting the Custom “All” value.
- To confirm and apply the new variable configuration, click Apply.
- Optional: To cancel any changes to the variable, click Cancel.
Configure an interval variable
Use an interval variable to set a default time period for a dashboard.- Configure or create a dashboard variable.
- Set the Type to Interval.
- In the Interval options text box, add a time period. This should be a
numerical time amount, followed by a time unit. The following are examples of usable time periods:
30s5m6h1d
- Toggle Include “Auto” option to set a minimum interval when auto is enabled.
- Click Add.
- Click Apply.
Delete a dashboard variable
To delete a dashboard variable:- View the list of dashboard variables.
- On the row of the variable you want to edit, click Delete variable. This action immediately deletes the variable without confirmation. Ensure that you want to delete the variable before clicking the icon.
- To apply the variable deletion and other changes to dashboard variables, click Apply.
- Optional: To cancel any deletions and other changes to dashboard variables, click Cancel.
Define the order of dashboard variables
Dashboards present dashboard variables from left to right in the same order as they appear in the Dashboard Variables list. To reorder dashboard variables:- View the list of dashboard variables.
- On the row of the variable you want to reorder, click Reorder variable up or Reorder variable down to move the variable within the list to the position you want.
- To confirm and apply the new variable order and other changes to dashboard variables, click Apply.
- Optional: To cancel any changes to dashboard variables, click Cancel.
Toggle dashboard variable visibility
You can define whether a dashboard variable appears on its dashboard. This helps you create and test dashboard variables without disrupting other users, and helps users curate large lists of dashboard variables to focus on what they want to analyze.Saved views
This feature isn’t available to all Chronosphere Observability Platform users and
might not be visible in your app. For information about enabling this feature in your
environment, contact Chronosphere Support.
changed
indicator.
Update the view
You can save multiple views for a dashboard. To save a view if you add a value to a variable’s text:- Click the Saved View menu.
- Choose Create new view to save a new view, or Update view to overwrite the current view’s values. A confirmation message with the new values displays.
- If you select Create new view, add a Name and then click Save.
- If you select Update view, decide if you want to Save current time range a default, and then click Save.
- Open the Saved View menu.
- Hold the pointer over the view you want to edit.
- Click Edit.
- Optional. Update the Name.
- Optional. Select Save as default view to set this view as the Default view.
- Click Save.
Delete a view
You can’t delete the Default View. To delete a custom saved view:- Open the Saved View menu.
- Hold the pointer over the view you want to delete.
- Click Delete.