I’m trying to setup a simple alert rule where I query data for a given time range e.g. last hour. I have tried using the global variables and functions to set the between statements and I get an error ‘Invalid Date’.
The same query does work when used in a panel.
If the alert query is updated with a hardcoded date range it does work. If I try resolving this with sql using built in functions again it does not work.
Should we be escaping special cases in the Alert rule query definition, if so how?
Below is an example query as a guide.
select Code, LatencyInNs
where Ts BETWEEN ‘2022-10-19T02:45:36.017Z’ AND ‘2022-10-19T14:45:36.017Z’
The above static statement works but if you replace the last line with: