liveBook · Manning

Dashboard variable

As explained in Cloud Observability in Action

A dashboard variable is a configurable dashboard value that users can select to parameterize queries or other dashboard elements.

A dashboard variable is a configurable value that makes dashboards reusable by letting users select parameters for queries or other dashboard elements. section 6.1.1

Selecting HTTP response codes

In Grafana, create a custom variable named Test with the label An Example Dropdown and the values 200, 301, and 404. A user can then select one or more codes, while a PromQL panel substitutes $test into a request-rate query. section 6.1.1

A practical setup follows this workflow:

  • Open Dashboard Settings, choose Variables, add the variable, configure its type and values, and select Update. section 6.1.1
  • Use the variable in a panel query to correlate dashboard views with selected values. section 6.1.1

How Cloud Observability in Action covers it

How deep it goes
Defines custom dropdown variables and demonstrates their use in PromQL, while deferring broader variable types to a brief note.
Examples
Uses a custom 200, 301, 404 dropdown and inserts $test into a Prometheus request-rate query.
What you can do after
Apply it via Grafana to build reusable dashboards with user-selectable query parameters.
How it connects
Connects variables with Grafana dashboards, panels, visualizations, data sources, PromQL, transformations, and correlations.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Cloud Observability in Action. The section links point to the parts of the book it draws on.