How can we define alert for a panel with templating variables?

Grafana is supporting dashboard with templating variables,but we can’t create a alert for a panel with templating variables?
Can we have any workarounds or can we have some source code modified to get it done? any suggestions?

thanks

Hi,

We have not implemented support for template variables. It would be very complicated to support and we are not sure how to do it yet in a way that would intuitive for the user. Most query languages have wildcards and other ways to target many series which removes most uses for template variables in alerting. Template variables are mostly a feature designed for creating reusable dashboards that allow you to change the scope or drill down to specific metrics. So most use cases for template variables does not fit alerting very well.

This is not something we are working on right now. But if we do get a good proposal for how it could be implemented and work in an intuitive way are open to add support for it.