The alert message does not print variables defined at dashboard-level (as a constant), using the documented syntax : ${variable}. Instead the template is printed directly as a string.
Currently, i only succeed to print the last value of a given column of the table resulting from the query corresponding to the alert. This means that i need to pass all needed values to the query at the panel-level, instead of using a constant or a query at the dashboard-level.
Furthermore, it seems that the values of the template are printed only when the alert goes to the ALERTING state. When it comes back to the OK states, the template string is printed in place (see below). Is there a way to customize the message between the two conditions ?
- What Grafana version and what operating system are you using?
Grafana Open Source 7.5.2
- What are you trying to achieve?
Print the content of the variables in both cases (dashboard-level and alert going back to normal)
- How are you trying to achieve it?
- defining a constant at dashboard-level
- including the variable in the alert message with the ${variable} syntax
- What happened?
See the captures
- What did you expect to happen?
Having the variables printed
-
Can you copy/paste the configuration(s) that you are having problems with?
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
No specific errors
- Did you follow any online instructions? If so, what is the URL?
I did not found more help