Storage Analyse Loki

Hi @all

I wonder if there is a way to analyze used storage by loki.
i use filesystem as storage - and at the moment i use about 50gb of storage for my loki data.

i wonder, if there is a way to find out more about the stored data.

for example: i have logs, which are queryable by:


is there a chance to find out, how many MB/GB of the stored data fetch with this selectors?

so: can i find out size of stored data by selectors?

thanks and regards

You can use bytes_over_time, like so:

bytes_over_time({app="app-name",host=~"^cowa-iofxw.*"} [$__interval])

And if you just want to get one data point instead of over time, you can put a sum() around it:

sum(bytes_over_time({app="app-name",host=~"^cowa-iofxw.*"} [$__interval]))