promxy icon indicating copy to clipboard operation
promxy copied to clipboard

Add ability to merge results on `replica` label as Thanos Query does

Open valyala opened this issue 4 years ago • 3 comments

Thanos Query component accepts --query.replica-label command-line flag for data deduplication - see https://github.com/thanos-io/thanos/blob/master/docs/components/query.md#deduplication .

It would be great if Promxy would add similar ability to merge results from multiple upstream data sources based on the replica label with the configured name.

valyala avatar Jan 15 '20 10:01 valyala

I would also like to see this feature, since I'm running VM in parallel to Thanos for the last half year. I'm migrating to VM, but would love to use old metrics to deduplicate results but can't due to unique replica labels in each victoriametrics server.

matejzero avatar Jan 16 '20 07:01 matejzero

So from reading through the linked doc it seems that the request is to basically use a label solely as a dedupe label (meaning we don't include that label in the "uniqueness" of a given timeseries) -- and we remove that label in the query path (after doing the dedupe). This seems like it should be doable. I'm not sure when I'll get around to it -- but if anyone is interested in submitting a PR before I get around to it I'll definitely review :)

jacksontj avatar Jan 21 '20 17:01 jacksontj

Yep, replica label is only used for dedupe and then removed (ie. not included in the end result).

matejzero avatar Jan 21 '20 17:01 matejzero