`sum(count_over_time({...}[$__range])) group by (...)` counts an entry where there is none

Hi there.

I’m quite new to grafana and loki. And based on the documentation and a lot of try and error I’ve build a dashboard which uses a ‘Bar gauge’ visualization of the results of a sum(count_over_time({...}[$__range])) group by (mylabel) construct. The aim of the dashboard is a overview of the number of log-entries grouped by a specific label for the last 7 days.

On the first glance it seems to work well. I compared the counts in the metric overview with the results of a simple logstream like {mylabel=xyz}. But in the overview I’ve got several bars counting 1 entry for a label-value. But the control panel with the simple logstream for that label-value doesn’t show any data for the same time-range. I’ve no clue why this happens.

Since this is very annoying for my data evaluation any help is very appriciated. Please ask if you need more information. (I’ve already tried a lot using the explore and inspect options for the query.)

Thanks in advance.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.