Variables
$varname substitution. Three types:
static
A fixed list of values. {name:"env", options:["prod","staging","dev"]}. Good for rarely changing choices.
label_values
Loads label values from an existing metric. {name:"host", metric:"system_cpu_usage_percent", label:"host"}. Refreshed on every dashboard load.
query (new)
Runs an arbitrary PromQL query and pulls the given label's values out of the resulting vector. {name:"job", expr:"group by (job) (up)", label:"job"}.
Substitution happens on the client: $varname and ${varname} in metric or filter values are replaced before the request. The server is variable-agnostic, so variables cannot be used in alert rules (use saved filters instead).