Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphite URL API reducing resolution for big time intervals

Tags:

graphite

I have the following problem. If I ask graphite for a chart from 2 years ago until today, with data each second, like this:

http://graphite/render?target=averageSeries(server.web1.load)&from=-2years

it is displayed correctly and very fast. obviously not all the points from the past 2 years are rendered. But if I ask graphite for the csv output to render the points myself using other plot library:

http://graphite/render?target=averageSeries(server.web*.load)&from=-2years&format=csv

I get the WHOLE set of points (2 years * 365 days * 24 hours * 60 min * 60 secs of points). Is there a way to make graphite to reduce this number? for example asking for a max of N points doing the average of groups of size WHOLE / N or something like that. Thanks

like image 390
Mauricio Avatar asked Dec 28 '12 02:12

Mauricio


1 Answers

function summarize is what you need. Since the data points on the chart is more than the available pixels, summarize could aggregate points with your chosen method (avg, max, min, or last). Though you'll need to calculate the proper interval based on the number of data points and the total duration.

like image 82
bryantsai Avatar answered Sep 22 '22 04:09

bryantsai