Comment 5 for bug 850475

Revision history for this message
Nicholas Leskiw (nleskiw) wrote : Re: [Bug 850475] Re: Y-values in graph are cut as graphed period gets longer

Imagine if your graph was 50 pixels wide. Now imagine your data was
[1000,5,1000,5,1000,5...] and you were graphing the past 100 minutes.

What should the y-value be at pixel 1 of the graph? One horizontal pixel
must represent TWO datapoints (In this example 1000 and 5.)

Graphite averages them by default. You'd get 502.5 at that pixel.
If you want to add the values (1000+5 = 1005) then wrap it in the
cumulative() function. (Chris probably meant cumulative, I think...)

Adding the values doesn't make sense when you're tracking latency or
checking the free memory on a server.

Either way, summing or averaging by default, someone's unhappy.

-Nick

On Thu, Sep 15, 2011 at 4:47 AM, Chris D <email address hidden> wrote:

> Thanks for the prompt response. Unfortunately, I'm more confused than
> before, for a couple reasons:
>
> 1) Why is Graphite doing anything with the values at all? I don't want
> to aggregate them, I just want to graph them: [t1, 371], [t2, 375], [t3,
> 410]. Connecting them with a pretty line would be nice, but at this
> point I'm confused why just doing a straight-up graph is a problem.
>
> 2) I tried summarize() as you suggested:
>
>
> /render?from=-3days&until=now&width=1024&height=800&target=summarize(stats_counts.blah.worker.count,%2215m%22,%22sum%22)
>
> Which produces this (strange since I only perceive 3 arguments in my
> summarize() call):
>
> TypeError: summarize() takes exactly 3 arguments (4 given)
>
> If Graphite won't produce a straight up plot without munging the data, I
> feel like I'm missing something fundamental about what Graphite is
> doing. :-/ I'd appreciate any help in understanding what's going on.
>
> --
> You received this bug notification because you are subscribed to
> Graphite.
> https://bugs.launchpad.net/bugs/850475
>
> Title:
> Y-values in graph are cut as graphed period gets longer
>
> Status in Graphite - Enterprise scalable realtime graphing:
> Incomplete
>
> Bug description:
> I have a counter, sent every 2 minutes. In this case, it's 371.
>
> If I graph it at 15 hours or less, it graphs correctly.
>
> At 20 hours, it graphs the 371 at around 190.
>
> URL
>
> /render?from=-20hours&until=now&width=1024&height=768&yMax=500&areaMode=first&lineMode=staircase&hideLegend=true&target=blah
>
> Images are attached.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/graphite/+bug/850475/+subscriptions
>