0

I'm using the incr function from the python statsd client. The key I'm sending for the name is registered in graphite but it shows up as a flat line on the graph. What filters or transforms do I need to apply to get the rate of the increments over time? I've tried an apply function > transform > integral and an apply function > special > aggregate by sum but no success yet.

AJP
  • 26,547
  • 23
  • 88
  • 127

2 Answers2

3

Your requested function is "Summarize" - see it over here: http://graphite.readthedocs.org/en/latest/functions.html

In order to the totals over time just use the summarize functions with the "alignToFrom = true". For example: You can use the following metric for 1 day period: summarize(stats_counts.your.metrics.path,"1d","sum",true)

See graphite summarize datapoints for more details.

Community
  • 1
  • 1
Tomer Peled
  • 3,571
  • 5
  • 35
  • 57
  • That's an interesting and useful transform @Tommer. Do you have any thoughts / links to info on the scale it produces for your data, seems arbitrary. – AJP Apr 30 '13 at 19:21
  • 2
    You have to use "stats_counts" instead of "stats" in order to get the correct value. "stats" metrics are calculated per second, while "stats_counts" are the values per flush interval (default is 10 second). Also, I don't know how you configured your Graphite Storage Schemas , but if you have several retentions, then you'll have to make sure that the aggregation to the next level is done int the way you desire. See more information over here: http://graphite.readthedocs.org/en/latest/config-carbon.html#storage-aggregation-conf – Tomer Peled Apr 30 '13 at 20:28
  • finally got round to doing this. Works like a charm. Thanks very much for the links to the extra docs. – AJP May 15 '13 at 17:25
0

The data is there, it just needs hundreds of counts before you start to be able to see it on the graph. Taking the integral also works and shows number of cumulative hits over time, have had to multiple it by x100 to get approximately the correct value.

AJP
  • 26,547
  • 23
  • 88
  • 127