Use Dashboard Variables in Alerts

I am using Grafana v10.1.0 through Docker.

I have a dashboard that uses a variable to define the list of hostnames I’m interested in displaying data for. This works well as we add new machines we can just update this variable.

I’d like to re-use that variable in my alerts. I’d also be okay if I just define the variable again in the Alert page. Neither seem to be things one can do with alerts.

Is there a mechanism of any kind to supply a variable to an Alert so I don’t have to edit a bunch of alert queries?

Hi! :wave: No dashboard variables are not supported in Grafana Alerting as their purpose is to support filtering data when viewing panels. You’ll want to use multi-dimensional alerting instead which means there is no need to use dashboard variables. You can find more information on that here: