Hi,
I was using the 'rate' feature of opentsdb to calculate the networking i/o rate for hosts, and had some problems.
Our metric 'host.networking.incoming.bytes' is a counter with the maximum value of 2^32-1. The metric reports a datapoint every minute. The rate calculation works well when we calculate with each raw datapoint, i.e., every minute.
The problems are:
1. When downsampling is used. When we want to calculate the rate hourly or even daily, we need to use downsampling before rate conversion. We were using opentsdb 2.2 so there's no 'last' function so we had to use 'max' instead. This caused inaccuracy. I noticed that opentsdb 2.3 introduced 'last' which I guess should resolve this problem, but is there a solution for opentsdb 2.2?
2. Further, if the downsampling period is very long, and the counter has reached the maximum value and rolls to 0 for several times, neither 'last' nor 'max' works well for this case. What's the best practice for this scenario?
Also, what do other time series databases handle the rate calculation? How do they handle the problems list above?
Thanks.
--huafeng