I am trying to create an alerting rule using the below query on grafana
SELECT
$__timeGroupAlias(time, '5m'),
nodeName,
mountPoint,
MAX(totalSpace) AS totalSpace,
MAX(freeSpace) AS freeSpace,
(MAX(totalSpace) - MAX(freeSpace)) AS "UsedSpace",
(CAST(MAX(totalSpace) - MAX(freeSpace) AS DOUBLE) / CAST(MAX(totalSpace) AS DOUBLE)) * 100 AS "Disk Utilization (%)"
FROM $database."hub-disk-usage"
WHERE $__timeFilter(time)
GROUP BY 1, nodeName, mountPoint
ORDER BY 1 DESC
However I am getting the error
Failed to evaluate queries and expressions: failed to execute query A: ValidationException: The query syntax is invalid at line 2:3
Can someone please advice
I am expecting a table with the diskusage to be populated