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
