-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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: Pivot aggregator #5203
Comments
Thinking a little more about it, I'm not sure you always want to preserve the timestamps. Maybe we should make that an option. If you don't preserve the timestamp, the resulting value should be an average (or other operation) across all elements AND timestamps that share the same pivot element value. We also need some missing value management. You would probably want an option to handle missing values by repeating the latest known value for a couple of cycles. That saves you from having skewed numbers because of occasional dropped samples. |
Would this be similar to doing a tagexclude, using host in the above example, with the basicstats aggregator? BTW, might be best to test with 1.8 until #5209 is fixed. |
There was some extra functionality, such as metric name substitution etc. we needed, but the immediate need for this aggregator sort of went away, so I'm closing this for now. |
I actually have a need for something described above. In this instance we are trying to aggregate data from multiple details on a tag value into summaries (sum and avg). I can do this with basicstats using ie: Would result in all metrics being grouped by workload and system, and the output metrics would only include those 2 tags. |
It seems to me that [[aggregators.basicstats]]
period = "10s"
drop_original = false
stats = ["sum"]
namepass = "foo"
taginclude = ["workload", "system"]
Even if this is the same, we should at least document this technique because it isn't very obvious. |
Played with this some more, and it turns out that One side effect, though I'm not sure this is intentional is that I also happen to get a single metric from the aggregator which is an aggregation of all metrics that did not include the tags in my I'm happy to take a stab at cleaning up the doc mentioned above to showcase how taginclude can be leveraged to create dynamic groups with aggregator plugins. (edited because i confused taginclude with tagpass... smh) |
Thanks that would be great! Sadly, taginclude is the equivalent of fielddrop, which I find very confusing. |
Closing with the new documentation, also I have something different that we might want to use the pivot name for: #5629. |
Feature Request
Add a pivot aggregator for creating aggregated metrics based on a pivot field.
Opening a feature request kicks off a discussion.
Proposal:
Assume you have a stream of metrics for hosts. Each host is part of a cluster, which is associated with the tag
cluster
. Furthermore, assume each host has acpuload
metric. I would like to synthesize a metrics for thecpuload
per cluster with a max, min, average, etc. aggregation.Contrary to other aggregators, this one would preserve timestamps, but average based on a pivot element, rather than a time period.
We are planning on writing this plugin, but wanted to file an issue for tracking and commenting purposes.
Example
Input:
Output:
Notice that the plugin would have more aggregations than average, but these are omitted for brevity.
Current behavior:
No pivot aggregator exists
Desired behavior:
A pivot aggregator exists
Use case: [Why is this important (helps with prioritizing requests)]
There are countless use cases for this. The one that's the most pressing for us right now is the ability to synthesize vSphere cluster metrics from hosts. But since pivoting is a very common statistics operator, I'm confident this plugin would find many other uses.
The text was updated successfully, but these errors were encountered: