The accumulation of value in graphite

I send one message every time a user connects to my site.

In this format:

"user_login 1 13xxxxxxx" (key value timestamp) 

My problem is Graphite gives me a one line graph with a value of "1" every minute. I send a random number of messages every minute (from 6 to 60), but I think Graphite limits the first (or last?) Message to display the value.

How to make to have the sum of each message every minute?

+13
graphite
Aug 17 2018-11-11T00:
source share
8 answers

You can also try using the carbon aggregation service to aggregate metrics when they are collected, rather than in the graphical interface. See http://graphite.readthedocs.org/en/latest/config-carbon.html#aggregation-rules-conf to configure the aggregation rule. Please note that you need to send the metric to the carbon aggregation service port, which operates in a different port than the regular carbon collector port.

+11
Jun 30 '12 at 10:40
source share

You may be interested in running statsd or statsite on your graphite server. This software will collect all statistics for a certain period of time and write the result to graphite.

Take a look at github.com/etsy/statsd (in node.js) and github.com/kiip/statsite (python clone). Etsy statsd contains some sample code on how to use it.

+7
Oct 28 '11 at 10:01
source share

use sumSeries target = sumSeries (graphite name .counterName) or sum function if you want to sum more than one minute

+3
Sep 10 2018-11-11T00:
source share

Jari is true, a carbon aggregator has been specifically designed for this.

Make sure you use the sum function in aggregation-rules.conf, for example:

 bpu.<cluster>.<account>.<metric>_sum (1) = sum bpu.<cluster>.<account>.<metric>_sum 
+3
Jan 11 '13 at
source share

It can also be the way your data is aggregated into a metric; by default, these are average values ​​that may not be what you expect. See Also Tracking metrics using StatsD (via etsy) and Graphite, a graph graph does not seem to display all the data .

+1
Mar 06 2018-12-12T00:
source share

Use the cumulative function in your series.

By default, when drawing a graph and the width of the graph in pixels is less than the number of data points to be plotted, Graphite averages the value for each pixel. The cumulative () function changes the consolidation function by the sum of the average value.

+1
Mar 10 2018-12-12T00:
source share

by default, graphite only stores the last value sent for any incoming metric in the minimum gradation (not the average value). if you need aggregates, a common solution is to use statsd .

however, you can also use a carbon aggregate. just make sure that you submit your metrics to the aggregator line port, and then update aggregation-rules.conf with this rule:

 user_login (10) = sum user_login$ 

Note: it is assumed that your minimum storage period is 10 seconds (by default), you can confirm this by looking at the storage-schemas.conf file

for a more detailed explanation, see Why use statsd when a graphite carbon aggregate can do the same job?

+1
May 01 '15 at 1:50 pm
source share



All Articles