Skip to content

Template variables are not supported in alert queries #9334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zhanglp92 opened this issue Sep 22, 2017 · 38 comments
Closed

Template variables are not supported in alert queries #9334

zhanglp92 opened this issue Sep 22, 2017 · 38 comments

Comments

@zhanglp92
Copy link

我想给使用 Template 的 panel 添加 alert ,但是会出现 “Template variables are not supported in alert queries” 这个问题,有什么办法能解决吗 ?

@bergquist
Copy link
Contributor

Template variables are not supported in alerting.
Template variables should be used for discovery and drill down. Not controlling alert rules

its also a dupe of #6557

@zhanglp92
Copy link
Author

3Q

@zhanglp92
Copy link
Author

image
image

I want monitor this data ,What should I do ?

@torkelo
Copy link
Member

torkelo commented Sep 22, 2017

Remove template variables, replace with wildcard or regex pattern

@tiagoreip
Copy link

tiagoreip commented Oct 11, 2017

where do i remove those template variables ?
It complains if i use this in the metrics 👍
SELECT mean("available_percent") FROM "mem" WHERE "host" =~ /^$host$/ and $timeFilter GROUP BY time($interval) fill(null)

So i cannot tell the alert to use the host that is having that issue ? will i have to add every host on the panel in order to choose them for the alert ?

@DimitriyKh
Copy link

It would be grate to add templates support in alerts. Otherwise the feature looks useless a bit.

@Xaelias
Copy link

Xaelias commented Feb 18, 2018

How about adding a way to provide the values of said variables?

@sanchomuzax
Copy link

I updated the Grafana to 5.0 and after I can't use the alerting system. Its works wit 4.6, why can't use on 5.0?
I don't use template variable on alerted graph.

Template variables are not supported in alert queries

@pstatho
Copy link

pstatho commented Sep 18, 2018

Agreed with @tiagoreip and @DimitriyKh , the query has a template variable to make the dashboards and it defeats the purpose to not be able to reuse the query for alerting.

@torkelo can you explain how we should be doing this with many graphs and many dashboards?

@Jeskz0rd
Copy link

It still doesn't make sense for me, if you are able to template your dashboard and make it easier to work and even to watch, why couldn't We create an alert based on this templated dashboard?

@kaybinwong
Copy link

It would be grate to add templates support in alerts. Otherwise the feature looks useless a bit.
+1

@maklaut
Copy link

maklaut commented Feb 8, 2019

+1

@yasongxu
Copy link

yasongxu commented Mar 1, 2019

+1 will support in new version ?

@wheelo
Copy link

wheelo commented Mar 1, 2019

+1

13 similar comments
@rashidmahmood
Copy link

+1

@fanjun1980
Copy link

+1

@bcaparoon
Copy link

+1

@shinhwagk
Copy link

+1

@tushar00jain
Copy link

+1

@lebd
Copy link

lebd commented Mar 27, 2019

+1

@lephisto
Copy link

+1

@wansuiye
Copy link

+1

@MikeL9286
Copy link

+1

@singOfBird
Copy link

+1

@izern
Copy link

izern commented Apr 10, 2019

+1

@markfengyunzhou
Copy link

+1

@511er
Copy link

511er commented Apr 16, 2019

+1

@phneak
Copy link

phneak commented Apr 30, 2019

+5

@deanmax
Copy link

deanmax commented May 23, 2019

+1

@JokerQyou
Copy link

Why is this issue not locked as spam like #6557 ? These +1 s are getting us nowhere closer to the goal.

@phneak
Copy link

phneak commented May 24, 2019

Why do people keep asking for this and it keeps getting shut down?

@JokerQyou
Copy link

It's not shut down. This issue was closed because it is a duplicate of #6557 which kindly suggest adding variable support as a feature request. That issue is still open. It's only locked because people can't stop commenting meaningless +1 s to spam everyone in the same thread.

I'd like to quote one of the comments from that issue, in case you don't understand why +1 messages are not welcomed:

Please stop +1'ing this issue. It generates unnecessary spam emails. The ability to add a reaction to a github issue comment has existed for a while now, and over 429 people have figured out how to like the initial comment instead of spamming everybody who is subscribed.

@hunanjsd
Copy link

hunanjsd commented Oct 9, 2019

+1

@gopalk20
Copy link

gopalk20 commented Jul 10, 2020

Is this feature is available in 7.0 version?

@chanyshev
Copy link

Version 8.0.* has already been released and the problem is still not solved =(

@Nastradamus
Copy link

up, it's very annoying

@zhangbincheng1997
Copy link

2022 is also not supported.:sob:

@linuxwind
Copy link

2023 is also not supported.😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests