简体   繁体   中英

sum of count_over_time by day

I have the following Loki query in Grafana:

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

which gives

结果在格拉法纳

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).

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM