Aggregating counters over time

0

I have a counter of events, and trying to plot aggregate counts per day, per hour etc., but having trouble making sense of the results I am getting.

Here, I plotted two queries: sum(increase(counter[1h])) with Min Step being 1 hour (green bars) and sum(increase(counter[1d])) with Min Stem 1 day (orange bars)

Looking at the rightmost organge bar here, I expect the value (69055) to be the sum of the 24 green bars to the left of it. There are only four of them, that are non-zero and their values are 54942, 2566, 12190 and 370. If I add these up, the total is 70068, so I am trying to understand where the “extra” 1013 came from.

Any help is appreciated.

Hi @dtkach,

Welcome to the :grafana: community support forums !!

We are excited that you joined our OSS community. Please read about some of the FAQs in the community :slight_smile:

Please review the submission template and include more details:

  • What Grafana version and what operating system are you using?
  • What is your datasource?
  • What visualization panel you are using e.g. time-series, bar chart, histogram etc?
  • What are you trying to achieve?
  • How are you trying to achieve it?
  • What happened?
  • What did you expect to happen?
  • Can you copy/paste the configuration(s) that you are having problems with?
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
  • Did you follow any online instructions? If so, what is the URL?