A definitive solution to the derivative/scaling issue

Asked by magec

Hi,

I know this problem has been asked previously but I can't find a good solution. The problem is that the derivative function simply calculates the difference between two metrics without taking into account the timestamp, so, if you sample at a n-minutes pace, the derivative will show values grouped into that sampling rate (normally that imply bigger values). A solution could be to scale the result. This is alright as long as you know the sampling rate, Im currently managing thousand of metrics and the graph creation is automated by means of munin2graphite so this approarch won't work. Another approach would be that of summarizing (i.e. oversampling) the metric before derivation, but this does not work, the result is not equivalent to that of the scaling method.

Looking into the code, I see, that the TimeSeries has a property called step that I guess is the time difference between points. Wouldn't it be correct to create a new funcion (let's call it timeUnitDerivative), that divide the function increment by the step in the implementation? If so I can myself send a patch with docu.

Thanks in advance, Jose Fernandez (magec)

Question information

Language:
English Edit question
Status:
Expired
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
magec (magec) said :
#2

Any ideas with this?

Revision history for this message
coredump (jose-junior) said :
#3

I have a similar problem. The relation between sample rate and the derivative function is not easy to understand, and I think the retention configuration on storage-schema also affects the metrics (what happens if I sample each 20 seconds but only retain minutes?).

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Michael Leinartas (mleinartas) said :
#5

There's some good discussion in another question that I think addresses the needs outline here:
https://answers.launchpad.net/graphite/+question/148743