-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] calculation of rate for counters #61
Comments
You mean a derivative or something? How exactly should the aggregation be computed in that case? |
Yes, derivative. Given two datapoints with (v1,t1), (v2, t2). It can be calculated as (v2 - v1) / (t2 - t1). |
so I imagine you'd want to do something like avg or sum of the derivatives of input streams, is that correct? derivative in graphite-context doesn't take timestamp into account though, so this is a bit more complex than that |
I think it's the graphite's |
I think this feature is really more helpful than the fancy As to me, we would like to compute how many bytes a network interface receives/sends per second, while the data collected by collectd is monotonic increasing,making it useless. And we must put the value into graphite and use graphite function to make useable. But we also have an realtime alerting system to which carbon-c-relay feeds data in realtime. And if we want to alert on network flow, we must compute it on the fly. |
Ok, I see how this is important, I just need to get an idea myself how to (properly) define how the rate counter or derivative should look like. Obviously, this will take an amazing amount of memory and cpu cycles to do (for we have to keep track of the metrics that would need this). It hints a lot like a "special" aggregation, but perhaps that is too much overhead to make this doable. |
|
How about you wait for 10s, and you calculate some functions based on the data points received during the 10s. As to rate, take the last and the first point, minus them and divide by their time diff. As to average, sum all and divides by the count. When the calculation is done, the result metric is put back into carbon-c-relay, so we can use it to calculate other metrics. |
I actually think that's a good idea. I also throught about it some more and think the |
while implementing this: |
I think if the interval is 3s. Then the bucket will be [0, 3] , [3, 6] ... |
I need to think of how I can get the same entry in two buckets in a sane way, or make the operation work on buckets instead of values. |
This is first work for issue #61. Allow storing all values in a bucket such that we can do calculations which need those (like e.g. true stddev). The objective to create a rate counter isn't met by this work since we need to compare values from different buckets. Perhaps this needs sliding/moving window support versus the current tumbling window support.
This is first work for issue #61. Allow storing all values in a bucket such that we can do calculations which need those (like e.g. true stddev). The objective to create a rate counter isn't met by this work since we need to compare values from different buckets. Perhaps this needs sliding/moving window support versus the current tumbling window support.
Note to self and others: the feature branch was merged with master, but doesn't allow solving this particular issue. Perhaps the easier way to do this would be to add a new construct, like rewrite, that will replace the value with the value since last seen. It might consume a lot of memory obviously, and would be pretty much unrestricted in consumption, so something that sounds like a lot of sharp edges. |
This is first work for issue grobian#61. Allow storing all values in a bucket such that we can do calculations which need those (like e.g. true stddev). The objective to create a rate counter isn't met by this work since we need to compare values from different buckets. Perhaps this needs sliding/moving window support versus the current tumbling window support.
It will be helpful if aggregation supports
rate calculation
.For example, network inflow or outflow data collected by collectd is monotonic increasing. We need to subtract two points and divide by time to get
bps
.The text was updated successfully, but these errors were encountered: