Y Axis values change depending on time range

It appears that you have a series that is being stored every minute, and every now and then the value stored is incremented by one.

On the “zoomed in” graph, you have a period of roughly 5 hours or 300 minutes, so graphite returns 300 points at one-minute intervals and you get the graph you expect.

When you zoom out, you’re now looking at a period of roughly 24 hours or 1200 minutes. Grafana can’t show more points than you have pixels on the graph (in this case roughly 1000) so with every request to graphite (or MT) it sends maxDataPoints=<graph width in px>. Because the one-minute resolution data would result in more than maxDataPoints being returned, Graphite downsamples the data by taking each pair of points and returning the average of that pair so it returns 600 points. That averaging is why you see values of 0.5, because they are the average of a point with a value of 1 and the adjacent point with a value of 0.

When you request an even longer time range like the ~52hrs in your CSV export, the same thing happens. In this case the raw data would have 52 * 60 = 3120 points, so Graphite has to combine each 4 adjacent points to not exceed maxDataPoints. This results in each returned point being spaced 4 minutes apart, and your spikes now having a value of average(1, 0, 0, 0) = 0.25.

The good news is the Graphite provides the consolidateBy function to tell it which function to use for that consolidation (which defaults to average as seen above). You can use consolidateBy('sum') to get correct results for your use-case, since it will sum the values that go into each interval rather than averaging them.

1 Like