Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[timelion] allow sum, subtract, multiply, divide functions to accept seriesList with multiple series #14891
Allow something like:
SeriesList are applied label-wise to each other resulting in one series per split.
thomasneirynck left a comment •
This is a great improvement, makes a lot of sense intuitively,
The behavior, when the labels in the split-series are not equal, seems a little undefined for a couple of use-cases.
Consider two scenarios (all use logstash example data):
consider these two split-series , which are identical:
We cannot substract them:
but subtracting them (which you probably don't want) doesn't yield any useful info
Maybe we should only apply this:
If those cases are not met, we should surface the error. What do you think?
Nov 17, 2017
@thomasneirynck Looks like comparing the labels is a bad idea. The labels contain the metric name and query string so they don't match if you are looking at different metrics or different queries. The
ppisljar left a comment
LGTM, i think it gives nice capabilities, and when you type something that wouldn't work you get the notification warning.
by the way, thomas in the examples above: why would you be doing the split on two different fields, whats the use case?
@ppisljar I think it might be useful to run a calculation on two different series when the concept in the two fields are the same. say e.g. to a delta comparison between sum of two fields, split over a couple of terms. Those terms may be the same concept, e.g. zipcode, country-code, username, ...
@thomasneirynck i agree, but i guess you should always split on a same field ... so first serie would be sum of bytes (split on top 5 countries) and second series might be the count (again on the same split). Dont see the usecase where you would want to first split on geo.src and in then on geo.dest ... it won't give you same top5 countries, so it won't make any sense to divide bytes from US by count from china ?