From 07492c756bd08ee5bc12cb452fb0945e04df1c49 Mon Sep 17 00:00:00 2001 From: Filip Petkovski Date: Sat, 9 Mar 2024 16:15:13 +0100 Subject: [PATCH] Add CHANGELOG entry and fix docs Signed-off-by: Filip Petkovski --- CHANGELOG.md | 1 + cmd/thanos/query.go | 2 -- cmd/thanos/rule.go | 1 - docs/components/query.md | 14 ++++++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69b05049f84..ca7efdce8ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#7105](https://github.com/thanos-io/thanos/pull/7105) Rule: add flag `--query.enable-x-functions` to allow usage of extended promql functions (xrate, xincrease, xdelta) in loaded rules - [#6867](https://github.com/thanos-io/thanos/pull/6867) Query UI: Tenant input box added to the Query UI, in order to be able to specify which tenant the query should use. - [#7175](https://github.com/thanos-io/thanos/pull/7175): Query: Add `--query.mode=distributed` which enables the new distributed mode of the Thanos query engine. +- [#7200](https://github.com/thanos-io/thanos/pull/7175): Query: Add `--selector.relabel-config` and `--selector.relabel-config-file` flags which allows scoping the Querier to a subset of matched TSDBs. ### Changed diff --git a/cmd/thanos/query.go b/cmd/thanos/query.go index 57d043abe48..09f86aaf4e2 100644 --- a/cmd/thanos/query.go +++ b/cmd/thanos/query.go @@ -538,7 +538,6 @@ func runQuery( strictEndpoints, endpointGroupAddrs, strictEndpointGroups, - tsdbSelector, dialOpts, unhealthyStoreTimeout, endpointInfoTimeout, @@ -854,7 +853,6 @@ func prepareEndpointSet( strictEndpoints []string, endpointGroupAddrs []string, strictEndpointGroups []string, - tsdbSelector *store.TSDBSelector, dialOpts []grpc.DialOption, unhealthyStoreTimeout time.Duration, endpointInfoTimeout time.Duration, diff --git a/cmd/thanos/rule.go b/cmd/thanos/rule.go index fa4322efcf0..1be8a8b406a 100644 --- a/cmd/thanos/rule.go +++ b/cmd/thanos/rule.go @@ -436,7 +436,6 @@ func runRule( nil, nil, nil, - store.DefaultSelector, dialOpts, 5*time.Minute, 5*time.Second, diff --git a/docs/components/query.md b/docs/components/query.md index a1716ad5f60..83a30b04400 100644 --- a/docs/components/query.md +++ b/docs/components/query.md @@ -460,6 +460,20 @@ Flags: --selector-label=="" ... Query selector labels that will be exposed in info endpoint (repeated). + --selector.relabel-config= + Alternative to 'selector.relabel-config-file' + flag (mutually exclusive). Content of + YAML file that contains relabeling + configuration that allows selecting + blocks. It follows native Prometheus + relabel-config syntax. See format details: + https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config + --selector.relabel-config-file= + Path to YAML file that contains relabeling + configuration that allows selecting + blocks. It follows native Prometheus + relabel-config syntax. See format details: + https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config --store= ... Deprecation Warning - This flag is deprecated and replaced with `endpoint`. Addresses of statically configured store API servers