Closed vbichov closed 2 weeks ago
Have you tried different syntax for accessing these variables? It seems like it's not replacing the ${xxx}
syntax. Either that or the variable isn't defined in alerts mode. Do these variables work with other datasources? Can you show the HTTP request payload? Usually the request itself will define the time range, so we can see whether it's included or not.
Usually I see these written as $__from
and $__to
. You could also try one of the macros which can replace the time for you.
@vbichov I am closing this issue. Please reopen if you still need help. 🙂
What happened:
I tried using grafana's $from and $to variables
in alert condition but got the following exception when testing alert condition:
What you expected to happen:
alert evaluation should have been successful
How to reproduce it (as minimally and precisely as possible):
run grafana 10.3.3 with legacy alerting enabled
create a graph pannel with query that uses $from an $to in it:
make sure the graph works
go to legacy alerts page - try to press
Test rule
Screenshots
Environment: