Image that we have a time series with timestamps t_1, t_2 ... t_n. And a metric m with values m_1, m_2 ... m_n for the respective timestamps.
Metric m is a counter so it will only increase.
Then there is a second metric k that is calculated from two nearby measures of m:
k(n) = m(n) - m(n - 1)
Basically k indicates the difference between two m measurements.
For example:
n | 1 | 2 | 3 | 4 |
m | 10 | 10 | 15 | 16 |
k | 0 | 0 | 5 | 1 |
What would be the query to OpenTSDB or Bosun that will return k based on m.
So far, I've only found rate feature but it is limited in showing rate per minute and it doesn't show the actual difference.
You can try Axibase Time Series Database which is compatible with tcollector and scollector protocols and provides a
ratetransformation to calculate the deltas. Theratetransformation returns the difference between consecutive values if the interval is set to0. There is a boolean flag that controls how counter resets (negative deltas) are handled.Here's a live example.
More details are available in this tutorial.