Support __range_s variable in the Loki query editor. #25561
Labels
datasource/Loki
prio/medium
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
type/feature-request
Like with Prometheus, upcoming Loki topK queries need the correct range to return the expected number of results. $__interval is supported, but this returns more results than the limit set in the topK, which is correct but counter-intuitive and not what is needed by the user. See also the Prometheus docs here:
https://grafana.com/docs/grafana/latest/features/datasources/prometheus/#templating
Loki is going to support the following syntax in upcoming versions:
topk(5, sum by (ipaddress) (count_over_time({filename="/var/log/nginx/access.log"} | regexp "(?P\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})"[10m])))
The text was updated successfully, but these errors were encountered: