https://community.grafana.com/t/template-variables-are-not-supported-in-alert-queries-while-setting-up-alert/2514/16
Seems to be a long discussion already.