← Back to team overview

graphite-dev team mailing list archive

Re: [Question #166935]: Retrieve data with a different step

 

Question #166935 on Graphite changed:
https://answers.launchpad.net/graphite/+question/166935

    Status: Open => Answered

Nicholas Leskiw proposed the following answer:
You have 3 options:

1. Use scale() in conjunction with summarize.
Example:
&target=scale(summarize(Server.apache1.BusyWorkers, "5min"),0.2)
You'll have to modify the scale factor to match the inverse of the number of
datapoints consolidated, (5 datapoints = 1/5 = 0.2.  15 datapoints = 1/15 =
0.06666...)

2. Use movingAverage()
It will not change the precision, but any datapoint you request will be the
average of the last N datapoints.

3. Create a new function called consolidate() in
webapp/graphite/render/functions.py that does what you want.  I'd copy the
summarize() function from the same file and use it as a framework - all you
should need to do is add a division operation to the summation. If you add a
diff / patch to a bug report, I'll review it and try to get it added to
trunk.

-Nick

On Fri, Aug 5, 2011 at 4:16 AM, Dani
<question166935@xxxxxxxxxxxxxxxxxxxxx>wrote:

> Question #166935 on Graphite changed:
> https://answers.launchpad.net/graphite/+question/166935
>
>    Status: Answered => Open
>
> Dani is still having a problem:
> Hi Nicholas,
>
> The problem with summarize is that in the end, it's a sum of data. I
> don't really want a sum.
>
> What I really need is the same data with less precission. I think it's
> just the same as when whisper consolidates data.
>
> I can have a wsp with a retention of 1 day with datapoints every 60
> seconds, and another archive inside the same wsp with a retention of 1
> week with datapoints every 900 seconds.
>
> I've I retrieve data from the first day whisper will give me n
> datapoints (one for each minut) but I want to retrieve data from last
> day, whisper will give n datapoints, but one for each 15 minutes. Is
> that right?  But whisper does not sum the data, as far as I know, I'm
> don't now if whispers saves an average of 15 '1minut_datapoint'  to make
> 1 '15minutes_datapoint'.
>
> Do you understand what I mean?
>
> Thanks in advance.
>
> --
> You received this question notification because you are a member of
> graphite-dev, which is an answer contact for Graphite.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~graphite-dev
> Post to     : graphite-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~graphite-dev
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.