0

I have the following Loki query in Grafana:

sum(count_over_time({filename="/var/log/cron.log", instance="node01"} |= `ERROR` [$__interval]))

which gives

results in Grafana

but I am at a loss trying to group the sum by day.

I tried various versions of sum by (grouping) (expr) but that usually ended in parsing errors. The docs don't seem very "all-encompassing".

I want a table that shows total sum or errors per day (in the given window).

tcurdt
  • 14,518
  • 10
  • 57
  • 72
  • Does this answer your question? [Is it possible to aggregate Loki logs by day on Grafana?](https://stackoverflow.com/questions/69126628/is-it-possible-to-aggregate-loki-logs-by-day-on-grafana) – Michael Doubez Feb 05 '23 at 16:30

1 Answers1

-1

https://grafana.slack.com/archives/CEPJRLQNL/p1673848218723049?thread_ts=1673553975.491289&cid=CEPJRLQNL

You only need to select type: instance in the grafana logql edit box and your problem should be solved.