diff --git a/cmd/thanos/query.go b/cmd/thanos/query.go index 09f86aaf4e2..75a29ee9fce 100644 --- a/cmd/thanos/query.go +++ b/cmd/thanos/query.go @@ -11,6 +11,7 @@ import ( "strings" "time" + extflag "github.com/efficientgo/tools/extkingpin" "google.golang.org/grpc" "github.com/go-kit/log" @@ -209,7 +210,13 @@ func registerQuery(app *extkingpin.App) { Default("1s")) storeResponseTimeout := extkingpin.ModelDuration(cmd.Flag("store.response-timeout", "If a Store doesn't send any data in this specified duration then a Store will be ignored and partial data will be returned if it's enabled. 0 disables timeout.").Default("0ms")) - storeSelectorRelabelConf := *extkingpin.RegisterSelectorRelabelFlags(cmd) + + storeSelectorRelabelConf := *extflag.RegisterPathOrContent( + cmd, + "selector.relabel-config", + "YAML with relabeling configuration that allows the Querier to select specific TSDBs by their external label. It follows native Prometheus relabel-config syntax. See format details: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config ", + extflag.WithEnvSubstitution(), + ) reqLogConfig := extkingpin.RegisterRequestLoggingFlags(cmd) diff --git a/docs/components/query.md b/docs/components/query.md index 83a30b04400..59aa9ed783a 100644 --- a/docs/components/query.md +++ b/docs/components/query.md @@ -462,16 +462,17 @@ Flags: 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 + flag (mutually exclusive). Content of YAML + with relabeling configuration that allows + the Querier to select specific TSDBs by their + external label. 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 + Path to YAML with relabeling configuration + that allows the Querier to select + specific TSDBs by their external label. + 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