# Template variables are not supported in alert queries

**URL:** https://forums.percona.com/t/template-variables-are-not-supported-in-alert-queries/7119
**Category:** PMM 1.x
**Created:** [July 19, 2019, 5:52am UTC](https://forums.percona.com/t/template-variables-are-not-supported-in-alert-queries/7119 "2019-07-19T05:52:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Dillon\_lu](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@Dillon\_lu](https://forums.percona.com/u/Dillon_lu)
#### Post date: [July 19, 2019, 5:52am UTC](https://forums.percona.com/t/template-variables-are-not-supported-in-alert-queries/7119/1 "2019-07-19T05:52:43Z")

</div>

Hi all,

version: pmm-admin 1.17.1  
I tried to create alert message by PMM with “Template variables are not supported in alert queries”. I searched website and found a solution by Percona: to copy and created a new metric modified the host name.

However, there is a problem. If I monitor a lot of DB instances, does this mean I have to create a lot of new metric?

Is there a way to create alert more convenience ?

Thanks,  
Dillon

---

<div class="post-metadata">

### Author: ![Peter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/peter/32/2_2.png) [@Peter](https://forums.percona.com/u/Peter)
#### Post date: [July 19, 2019, 6:03am UTC](https://forums.percona.com/t/template-variables-are-not-supported-in-alert-queries/7119/2 "2019-07-19T06:03:35Z")

</div>

Current solution is not perfect for sure. If you monitor a lot of instances you may want to create dashboard which triggers when any of the instances exceed threshold.  
For example if you monitor replication lag you may look for max seconds\_behind\_master among the fleet of slaves and have alert triggered when it happens. The problem with such approach is of course you would not directly see which host triggered it.

---

<div class="post-metadata">

### Author: ![Dillon\_lu](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@Dillon\_lu](https://forums.percona.com/u/Dillon_lu)
#### Post date: [July 23, 2019, 8:07pm UTC](https://forums.percona.com/t/template-variables-are-not-supported-in-alert-queries/7119/3 "2019-07-23T20:07:49Z")

</div>

> [@Peter;54323](#):
>
> Current solution is not perfect for sure. If you monitor a lot of instances you may want to create dashboard which triggers when any of the instances exceed threshold.  
> For example if you monitor replication lag you may look for max seconds\_behind\_master among the fleet of slaves and have alert triggered when it happens. The problem with such approach is of course you would not directly see which host triggered it.

Hi Peter,  
Thanks.
