# ERROR:-Template variables are not supported in alert queries

**URL:** <https://community.grafana.com/t/error-template-variables-are-not-supported-in-alert-queries/22675>\
**Category:** Alerting\
**Tags:** alerting\
**Created:** [November 7, 2019, 10:59am UTC](https://community.grafana.com/t/error-template-variables-are-not-supported-in-alert-queries/22675 "2019-11-07T10:59:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravicdac4](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@ravicdac4](https://community.grafana.com/u/ravicdac4)\
**Post date:** [November 7, 2019, 10:59am UTC](https://community.grafana.com/t/error-template-variables-are-not-supported-in-alert-queries/22675/1 "2019-11-07T10:59:06Z")

</div>

Hi Team,

I am a newbie to Grafana. I am facing issue while trigger the alert from Grafana. The problem is I am using this template(1860) for my dashboard. However I am trying to test my alert rule by clicking on the Test Rule button, I get below attached error.

Our data source is prometheus.  
Grafana Version -Grafana v6.0.2 (3f4c2e7)

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/4/4461fe2d17e31c04d7321f26c85760bf09d661d6.png)

Please have a look at the attached screenshot for the reference

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/a/a6ccfb2d04f7d96b4300f6d4909132a599c8e9f0.png)

Please help me here It became a bottle neck for me.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ivanahuckova](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/ivanahuckova/32/8541_2.png) [@ivanahuckova](https://community.grafana.com/u/ivanahuckova)\
**Post date:** [November 8, 2019, 2:15pm UTC](https://community.grafana.com/t/error-template-variables-are-not-supported-in-alert-queries/22675/2 "2019-11-08T14:15:28Z")

</div>

Hello ravicdac4! You can find more information on this issue here:

> [@Template variables are not supported in alert queries](https://community.grafana.com/t/template-variables-are-not-supported-in-alert-queries/2165):
>
> While setting alarm for CPU usage in grafana, facing below error Please help me

> [@"Template variables are not supported in alert queries" while setting up Alert](https://community.grafana.com/t/template-variables-are-not-supported-in-alert-queries-while-setting-up-alert/2514/10):
>
> Template variables just need a flag to be able to say “The alarm for this variable is not important”, i.e. because the variable is set up to show additional informational series, or filter by sections of data that wouldn’t matter for an alarm, but does matter for the user (i.e. show the CPU usage while a specific analytics process was running, but I still want an alarm on my CPU usage, from the same chart - it’s not friendly to say "well I can give you a big picture of everything on this chart, …

Also, there is a long discussion on why alerting with template variable is difficult and maybe not what people actually want:

- [https://github.com/grafana/grafana/issues/6557#issuecomment-324332718](https://github.com/grafana/grafana/issues/6557#issuecomment-324332718)
- [https://github.com/grafana/grafana/issues/6557#issuecomment-324350123](https://github.com/grafana/grafana/issues/6557#issuecomment-324350123)

---

<div class="post-metadata">

**Author:** ![ravicdac4](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@ravicdac4](https://community.grafana.com/u/ravicdac4)\
**Post date:** [November 11, 2019, 1:21pm UTC](https://community.grafana.com/t/error-template-variables-are-not-supported-in-alert-queries/22675/3 "2019-11-11T13:21:44Z")

</div>

Thanks for your help and support

---

<div class="post-metadata">

**Author:** ![satya07nie](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@satya07nie](https://community.grafana.com/u/satya07nie)\
**Post date:** [September 1, 2020, 8:09pm UTC](https://community.grafana.com/t/error-template-variables-are-not-supported-in-alert-queries/22675/4 "2020-09-01T20:09:05Z")

</div>

Is this resolved? If yes, How?  
I am also getting same error “Template variables are not supported in alert queries”. As an exampled while ‘Overall total disk & average disk used%’.
