How to set alert

hi, dears, I wanna set an alert on many dashboards of grafana but can’t could you please guide me for resolve this problem?

Check out this step in the Grafana fundamentals tutorial that walks you through creating an alert.

I would definitely recommend to check out the great tutorial that Marcus posted. :slightly_smiling_face:Also, to get more context on alerting and template variables, check out this thread with more information on the topic:

I check your guide but this is not my problem that how to create an alert in normal mode, my problem is I can not create alert because

Template variables are not supported in alert queries

the message that you see on the picture

thanks a lot dear @ivanahuckova i read all comments of your link but do not resolve my problem and now can not set any alert because see Template variables are not supported in alert queries message :frowning:

Unfortunately we are not supporting alerting if you use template variables. You can only set up alerting, if your query is not using template variables.

1 Like

this is possible to remove template variables also have data gathers that I can set alert ??? for example on below query:

avg by (node_name) ((max_over_time(node_memory_MemFree_bytes{node_name=~"$node_name"}[$interval]) or max_over_time(node_memory_MemFree_bytes{node_name=~"$node_name"}[5m])) * 100 /
(max_over_time(node_memory_MemTotal_bytes{node_name=~"$node_name"}[$interval]) or max_over_time(node_memory_MemTotal_bytes{node_name=~"$node_name"}[$interval])))

The alert queries are executed by the Grafana server and Grafana datasource backend plugins without web browsers. The reason is the alerts have to run even when people are sleeping.

On the other hand the template variables stay in the web browser only. They are not saved as a part of queries. Therefore the server can’t know the value of the template variables.