I am using Grafana Loki and I need to calculate the total number of a certain log message for a specific time interval. For example, I need the total number of log message "some-text" in the period from 12:00:00 to 14:00:00. I just found the following way to count the occurrences of the last minute, something this: count_over_time({container="some-containter"} |= "some-text")[1m]
, but i did not found any way to query a specific interval.
I would be very happy if this is possible and someone could help.
[start..end]
interval is easy to do in LogsQL:_time:[start, end] "some-text" | count()
– Encrust