Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to analyze loki storage space?

Tags:

grafana-loki

Today the disk space used by Loki has filled up. Is there a dashboard or function in Loki to identify which PODSs generated the most logs?

Something besides loki-canary?

I have never used this tool and I don't know if it is right for me

like image 294
Janka Avatar asked Oct 28 '25 04:10

Janka


1 Answers

You can analyse the logs generation with the following LogQL:

topk(10,count_over_time({filename=~".+"}[1h]))

Change the "{filename=~".+"}" stream selector and the "1h" log range as desired.

like image 147
Marcelo Ávila de Oliveira Avatar answered Oct 30 '25 14:10

Marcelo Ávila de Oliveira