Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphite: show change from previous value

Tags:

graphite

I am sending Graphite the time spent in Garbage Collection (getting this from jvm via jmx). This is a counter that increases. Is their a way to have Graphite graph the change every minute so I can see a graph that shows time spent in GC by minute?

like image 206
Dave Avatar asked Aug 17 '12 16:08

Dave


1 Answers

You should be able to turn the counter into a hit-rate with the Derivative function, then use the summarize function to the counter into the time frame that your after.

&target=summarize(derivative(java.gc_time), "1min") # time spent per minute

derivative(seriesList)

This is the opposite of the integral function. This is useful for taking a 
running totalmetric and showing how many requests per minute were handled.

&target=derivative(company.server.application01.ifconfig.TXPackets)

Each time you run ifconfig, the RX and TXPackets are higher (assuming there is network traffic.) By applying the derivative function, you can get an idea of the packets per minute sent or received, even though you’re only recording the total.

summarize(seriesList, intervalString, func='sum', alignToFrom=False)

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.

Source: http://graphite.readthedocs.org/en/0.9.10/functions.html

like image 91
dannyla Avatar answered Oct 21 '22 08:10

dannyla