I am using the new Unified Alerting platform.
Grafana version 8.5.3
Try to make an alert for every new row of data that arrives in my table/dashboard.
My query (A) looks as follows:
SELECT count(*) AS ‘aantal’
FROM anomalieen
WHERE ((UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(Tijdstip)) < (5 * 60))
I’m using expression (B) $A > 0 to get the final result: 0 or 1
Selecting ‘Stat’ button at ‘2 Create a query to be alerted on’ and ‘Run queries’ results in the expected count.
However after saving my query/alert rule ‘Stat’ seems to be changed in ‘Time series’.
This time running my query renders an error.
Is this a bug?
Set logging to debug.
In console nothing special.
In log two interesting lines:
After saving query:
Blockquote
2022-05-26 11:03:48 logger=sqlstore.transactions t=2022-05-26T11:03:48.51+0200 lvl=dbug msg=“skip committing the transaction because it belongs to a session created in the outer scope”