Search code examples
graphitestatsd

StatsD sends Average or Graphite stores Average instead of Sum


I am using StatsD to record Requests send to my Server, and Graphite to collect the statistics. But when I try to display the statistics, instead of a sum aggregated over a minute, I get averages. My retention rate for the requests is 1m:7d,5m:35d,1d:1y. My xFilesFactor is 0 and my aggregationMethod is sum. The FlushInterval of StatsD is set to 1m. What am I doing wrong?


Solution

  • Statsd normalizes the point it sends to graphite over that time period on a per second basis.

    The aggregationMethod is a config for Graphite retention schemas which specifies how points are aggregation as you go from (in your case) a 1m representation to a 5 minute per point representation (and so on).

    If you want the number of requests over that minute period, in graphite you can multiply the series by a constant 60 and get the result.