Grafana metrics providing random total values

First post, so be gentle!

I’ve sending a set of metrics to the metrics endpoint of Grafana cloud. However, I’ve seeing some really weird behaviour when trying to sum or total this metric. The metric itself is simple a count of an updates every minute (so it can vary 10, 0, 3, etc.)

However, when I try to use the “Total” figure in the Stat visualization - I am getting really weird behaviour!

When I “edit” the panel, the total is wrong (for the last 24 hours, as per time range)

  • It displays 12.4k
  • Setting of metric:
    Legacy_Replication_-_Grafana2
    viz2

But then, if I click the “refresh” icon, it is correct:

  • It displays 62.1k

If I save and go back to the dashboard, it is correct until I refresh with the 24 hour time range specified, it is wrong again:

  • Back to 12.4k

If I “view” the panel and click refresh, it is correct!

  • Back to 62.1k

Bizarre…I don’t know if I am sending metrics in the wrong format or I’ve configured the panel wrong!

I think I may have solved it…but not sure I understand it:

Sound like an interesting quirk:

## Point consolidation

All Graphite metrics are consolidated so that Graphite doesn’t return more data points than there are pixels in the graph. By default, this consolidation is done using avg function. You can control how Graphite consolidates metrics by adding the Graphite consolidateBy function.