Logql - how to cast litertal to vector

Hi,

what’s the equivalent of promql’s vector(0) in loki?

I have the following query
sum by (app) (sum_over_time{file="/logs/myapp.log"} |= “error” [1m]})

and I want to add a grafana alert on it whenever the resulting number is greater than 0

now I don’t want to handle the no data scenario and in prometheus I would do something along the lines of:
(query) or vector(0) and this would fill all the missing values with 0.

Is there any way to do the same in loki?

I’m currently running loki 2.3

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.