← Back to team overview

graphite-dev team mailing list archive

Re: [Question #177524]: can graphie scale to Ks of nodes at frequencies of seconds

 

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

Nicholas Leskiw proposed the following answer:
So let's say you usually see 1's for a particular value:

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1

now somewhere in the middle, you see a 10:

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1,

If your graph is setup so that there's at least 1 horizontal pixel per
datapoint, you'll still see a spike.

Even as you zoom out, you'll still see an anomaly, as the summarize
function adds things.  Example, with the above data, if there's 5 points
per pixel, it'll look like this:

5, 5, 5, 5, 15, 5, 5,

You still see a spike.  If this is still not acceptable, use the
summarize():

Summarize the data into interval buckets of a certain size.

  By default, the contents of each interval bucket are summed together. This is
  useful for counters where each increment represents a discrete event and
  retrieving a "per X" value requires summing all the events in that interval.

  Specifying 'avg' instead will return the mean for each bucket, which can be more
  useful when the value is a gauge that represents a certain value in time.

  'max', 'min' or 'last' can also be specified.

  By default, buckets are caculated by rounding to the nearest interval. This
  works well for intervals smaller than a day. For example, 22:32 will end up
  in the bucket 22:00-23:00 when the interval=1hour.

  Passing alignToFrom=true will instead create buckets starting at the from
  time. In this case, the bucket for 22:32 depends on the from time. If
  from=6:30 then the 1hour bucket for 22:32 is 22:30-23:30.

  Example:

    &target=summarize(counter.errors, "1hour") # total errors per hour
    &target=summarize(nonNegativeDerivative(gauge.num_users), "1week") # new users per week
    &target=summarize(queue.size, "1hour", "avg") # average queue size per hour
    &target=summarize(queue.size, "1hour", "max") # maximum queue size during each hour
    &target=summarize(metric, "13week", "avg", true)&from=midnight+20100101 # 2010 Q1-4

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