From 66a7152bcf4c0278d9b92dad6ba510c5db06a64f Mon Sep 17 00:00:00 2001 From: "HC Zhu (DB)" Date: Fri, 25 Apr 2025 16:49:37 -0700 Subject: [PATCH 1/5] Limit lazyRespSet memory buffer size using a ring buffer Signed-off-by: HC Zhu --- CHANGELOG.md | 1 + cmd/thanos/query.go | 6 +++ cmd/thanos/receive.go | 9 ++++ pkg/store/bucket.go | 18 ++++++++ pkg/store/bucket_test.go | 13 +++--- pkg/store/proxy.go | 10 ++++- pkg/store/proxy_merge.go | 91 ++++++++++++++++++++++++++++++++-------- pkg/store/proxy_test.go | 5 +++ 8 files changed, 129 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 561d1cd0a3e..28662a38c8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#8211](https://github.com/thanos-io/thanos/pull/8211) Query: fix panic on nested partial response in distributed instant query - [#8216](https://github.com/thanos-io/thanos/pull/8216) Query/Receive: fix iter race between `next()` and `stop()` introduced in https://github.com/thanos-io/thanos/pull/7821. - [#8212](https://github.com/thanos-io/thanos/pull/8212) Receive: Ensure forward/replication metrics are incremented in err cases +- [#8296](https://github.com/thanos-io/thanos/pull/8296) Query: limit LazyRetrieval memory buffer size ## [v0.38.0](https://github.com/thanos-io/thanos/tree/release-0.38) - 03.04.2025 diff --git a/cmd/thanos/query.go b/cmd/thanos/query.go index 12f7a5f5b44..4f60d83583c 100644 --- a/cmd/thanos/query.go +++ b/cmd/thanos/query.go @@ -202,6 +202,9 @@ func registerQuery(app *extkingpin.App) { strictEndpointGroups := extkingpin.Addrs(cmd.Flag("endpoint-group-strict", "(Deprecated, Experimental): DNS name of statically configured Thanos API server groups (repeatable) that are always used, even if the health check fails.").PlaceHolder("")) + lazyRetrievalMaxBufferedResponses := cmd.Flag("query.lazy-retrieval-max-buffered-responses", "The lazy retrieval strategy can buffer up to this number of responses. This is to limit the memory usage. This flag takes effect only when the lazy retrieval strategy is enabled."). + Default("20").Int() + var storeRateLimits store.SeriesSelectLimits storeRateLimits.RegisterFlags(cmd) @@ -345,6 +348,7 @@ func registerQuery(app *extkingpin.App) { *enforceTenancy, *tenantLabel, *queryDistributedWithOverlappingInterval, + *lazyRetrievalMaxBufferedResponses, ) }) } @@ -408,6 +412,7 @@ func runQuery( enforceTenancy bool, tenantLabel string, queryDistributedWithOverlappingInterval bool, + lazyRetrievalMaxBufferedResponses int, ) error { comp := component.Query if alertQueryURL == "" { @@ -421,6 +426,7 @@ func runQuery( options := []store.ProxyStoreOption{ store.WithTSDBSelector(tsdbSelector), store.WithProxyStoreDebugLogging(debugLogging), + store.WithLazyRetrievalMaxBufferedResponsesForProxy(lazyRetrievalMaxBufferedResponses), } // Parse and sanitize the provided replica labels flags. diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index 56f6e3d3c0f..b86853d2342 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -354,10 +354,14 @@ func runReceive( return errors.Wrap(err, "setup gRPC server") } + if conf.lazyRetrievalMaxBufferedResponses <= 0 { + return errors.New("--receive.lazy-retrieval-max-buffered-responses must be > 0") + } options := []store.ProxyStoreOption{ store.WithProxyStoreDebugLogging(debugLogging), store.WithMatcherCache(cache), store.WithoutDedup(), + store.WithLazyRetrievalMaxBufferedResponsesForProxy(conf.lazyRetrievalMaxBufferedResponses), } proxy := store.NewProxyStore( @@ -895,6 +899,8 @@ type receiveConfig struct { matcherCacheSize int + lazyRetrievalMaxBufferedResponses int + featureList *[]string headExpandedPostingsCacheSize uint64 @@ -1068,6 +1074,9 @@ func (rc *receiveConfig) registerFlag(cmd extkingpin.FlagClause) { cmd.Flag("receive.otlp-promote-resource-attributes", "(Repeatable) Resource attributes to include in OTLP metrics ingested by Receive.").Default("").StringsVar(&rc.otlpResourceAttributes) rc.featureList = cmd.Flag("enable-feature", "Comma separated experimental feature names to enable. The current list of features is "+metricNamesFilter+".").Default("").Strings() + + cmd.Flag("receive.lazy-retrieval-max-buffered-responses", "The lazy retrieval strategy can buffer up to this number of responses. This is to limit the memory usage. This flag takes effect only when the lazy retrieval strategy is enabled."). + Default("20").IntVar(&rc.lazyRetrievalMaxBufferedResponses) } // determineMode returns the ReceiverMode that this receiver is configured to run in. diff --git a/pkg/store/bucket.go b/pkg/store/bucket.go index 92432551830..5d92eac247b 100644 --- a/pkg/store/bucket.go +++ b/pkg/store/bucket.go @@ -446,6 +446,8 @@ type BucketStore struct { postingGroupMaxKeySeriesRatio float64 sortingStrategy sortingStrategy + // This flag limits memory usage when lazy retrieval strategy, newLazyRespSet(), is used. + lazyRetrievalMaxBufferedResponses int blockEstimatedMaxSeriesFunc BlockEstimator blockEstimatedMaxChunkFunc BlockEstimator @@ -610,6 +612,14 @@ func WithDontResort(true bool) BucketStoreOption { } } +func WithLazyRetrievalMaxBufferedResponsesForBucket(n int) BucketStoreOption { + return func(s *BucketStore) { + if true { + s.lazyRetrievalMaxBufferedResponses = n + } + } +} + // WithIndexHeaderLazyDownloadStrategy specifies what block to lazy download its index header. // Only used when lazy mmap is enabled at the same time. func WithIndexHeaderLazyDownloadStrategy(strategy indexheader.LazyDownloadIndexHeaderFunc) BucketStoreOption { @@ -683,6 +693,8 @@ func NewBucketStore( indexHeaderLazyDownloadStrategy: indexheader.AlwaysEagerDownloadIndexHeader, requestLoggerFunc: NoopRequestLoggerFunc, blockLifecycleCallback: &noopBlockLifecycleCallback{}, + + lazyRetrievalMaxBufferedResponses: 1, } for _, option := range options { @@ -1718,6 +1730,11 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, seriesSrv storepb.Store nil, ) } else { + lazyRetrievalMaxBufferedResponses := s.lazyRetrievalMaxBufferedResponses + if lazyRetrievalMaxBufferedResponses < 1 { + // Some unit and e2e tests hit this path. + lazyRetrievalMaxBufferedResponses = 1 + } resp = newLazyRespSet( span, 10*time.Minute, @@ -1728,6 +1745,7 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, seriesSrv storepb.Store shardMatcher, false, s.metrics.emptyPostingCount.WithLabelValues(tenant), + lazyRetrievalMaxBufferedResponses, ) } diff --git a/pkg/store/bucket_test.go b/pkg/store/bucket_test.go index 9c53e8e34db..2f29c361279 100644 --- a/pkg/store/bucket_test.go +++ b/pkg/store/bucket_test.go @@ -1789,12 +1789,13 @@ func TestBucketSeries_OneBlock_InMemIndexCacheSegfault(t *testing.T) { b1.meta.ULID: b1, b2.meta.ULID: b2, }, - queryGate: gate.NewNoop(), - chunksLimiterFactory: NewChunksLimiterFactory(0), - seriesLimiterFactory: NewSeriesLimiterFactory(0), - bytesLimiterFactory: NewBytesLimiterFactory(0), - seriesBatchSize: SeriesBatchSize, - requestLoggerFunc: NoopRequestLoggerFunc, + queryGate: gate.NewNoop(), + chunksLimiterFactory: NewChunksLimiterFactory(0), + seriesLimiterFactory: NewSeriesLimiterFactory(0), + bytesLimiterFactory: NewBytesLimiterFactory(0), + seriesBatchSize: SeriesBatchSize, + requestLoggerFunc: NoopRequestLoggerFunc, + lazyRetrievalMaxBufferedResponses: 1, } t.Run("invoke series for one block. Fill the cache on the way.", func(t *testing.T) { diff --git a/pkg/store/proxy.go b/pkg/store/proxy.go index 4ee987df294..cbc076c3aab 100644 --- a/pkg/store/proxy.go +++ b/pkg/store/proxy.go @@ -92,6 +92,8 @@ type ProxyStore struct { tsdbSelector *TSDBSelector matcherCache storecache.MatchersCache enableDedup bool + + lazyRetrievalMaxBufferedResponses int } type proxyStoreMetrics struct { @@ -118,6 +120,12 @@ func RegisterStoreServer(storeSrv storepb.StoreServer, logger log.Logger) func(* // ProxyStoreOption are functions that configure the ProxyStore. type ProxyStoreOption func(s *ProxyStore) +func WithLazyRetrievalMaxBufferedResponsesForProxy(buferSize int) ProxyStoreOption { + return func(s *ProxyStore) { + s.lazyRetrievalMaxBufferedResponses = buferSize + } +} + // WithProxyStoreDebugLogging toggles debug logging. func WithProxyStoreDebugLogging(enable bool) ProxyStoreOption { return func(s *ProxyStore) { @@ -309,7 +317,7 @@ func (s *ProxyStore) Series(originalRequest *storepb.SeriesRequest, srv storepb. for _, st := range stores { st := st - respSet, err := newAsyncRespSet(ctx, st, r, s.responseTimeout, s.retrievalStrategy, &s.buffers, r.ShardInfo, reqLogger, s.metrics.emptyStreamResponses) + respSet, err := newAsyncRespSet(ctx, st, r, s.responseTimeout, s.retrievalStrategy, &s.buffers, r.ShardInfo, reqLogger, s.metrics.emptyStreamResponses, s.lazyRetrievalMaxBufferedResponses) if err != nil { level.Error(reqLogger).Log("err", err) diff --git a/pkg/store/proxy_merge.go b/pkg/store/proxy_merge.go index 4442cf8fdbc..3968ed97e09 100644 --- a/pkg/store/proxy_merge.go +++ b/pkg/store/proxy_merge.go @@ -7,6 +7,7 @@ import ( "context" "fmt" "io" + "math" "sort" "sync" "time" @@ -227,8 +228,20 @@ type lazyRespSet struct { frameTimeout time.Duration // Internal bookkeeping. - dataOrFinishEvent *sync.Cond - bufferedResponses []*storepb.SeriesResponse + dataOrFinishEvent *sync.Cond + // This event firing means the buffer has a slot for more data. + bufferSlotEvent *sync.Cond + fixedBufferSize int + // This a ring buffer of size fixedBufferSize. + // A ring buffer of size N can hold N - 1 elements at most in order to distinguish being empty from being full. + bufferedResponses []*storepb.SeriesResponse + // ringHead points to the first element in the ring buffer. + // ringTail points to the slot after the last element in the ring buffer. + // if ringHead == ringTail then the buffer is empty. + // if ringHead == (ringTail + 1) % fixedBufferSize then the buffer is full. + ringHead int + ringTail int + closed bool bufferedResponsesMtx *sync.Mutex lastResp *storepb.SeriesResponse @@ -238,24 +251,32 @@ type lazyRespSet struct { shardMatcher *storepb.ShardMatcher } +func (l *lazyRespSet) isEmpty() bool { + return l.ringHead == l.ringTail +} + +func (l *lazyRespSet) isFull() bool { + return (l.ringTail+1)%l.fixedBufferSize == l.ringHead +} + func (l *lazyRespSet) Empty() bool { l.bufferedResponsesMtx.Lock() defer l.bufferedResponsesMtx.Unlock() // NOTE(GiedriusS): need to wait here for at least one // response so that we could build the heap properly. - if l.noMoreData && len(l.bufferedResponses) == 0 { + if l.noMoreData && l.isEmpty() { return true } - for len(l.bufferedResponses) == 0 { + for l.isEmpty() { l.dataOrFinishEvent.Wait() - if l.noMoreData && len(l.bufferedResponses) == 0 { + if l.noMoreData && l.isEmpty() { break } } - return len(l.bufferedResponses) == 0 && l.noMoreData + return l.isEmpty() && l.noMoreData } // Next either blocks until more data is available or reads @@ -267,23 +288,24 @@ func (l *lazyRespSet) Next() bool { l.initialized = true - if l.noMoreData && len(l.bufferedResponses) == 0 { + if l.noMoreData && l.isEmpty() { l.lastResp = nil return false } - for len(l.bufferedResponses) == 0 { + for l.isEmpty() { l.dataOrFinishEvent.Wait() - if l.noMoreData && len(l.bufferedResponses) == 0 { + if l.noMoreData && l.isEmpty() { break } } - if len(l.bufferedResponses) > 0 { - l.lastResp = l.bufferedResponses[0] + if !l.isEmpty() { + l.lastResp = l.bufferedResponses[l.ringHead] if l.initialized { - l.bufferedResponses = l.bufferedResponses[1:] + l.ringHead = (l.ringHead + 1) % l.fixedBufferSize + l.bufferSlotEvent.Signal() } return true } @@ -310,8 +332,12 @@ func newLazyRespSet( shardMatcher *storepb.ShardMatcher, applySharding bool, emptyStreamResponses prometheus.Counter, + fixedBufferSize int, ) respSet { - bufferedResponses := []*storepb.SeriesResponse{} + // A ring buffer of size N can hold N - 1 elements at most in order to distinguish being empty from being full. + // That's why the size is increased by 1 internally. + fixedBufferSize++ + bufferedResponses := make([]*storepb.SeriesResponse, fixedBufferSize) bufferedResponsesMtx := &sync.Mutex{} dataAvailable := sync.NewCond(bufferedResponsesMtx) @@ -323,9 +349,14 @@ func newLazyRespSet( closeSeries: closeSeries, span: span, dataOrFinishEvent: dataAvailable, + bufferSlotEvent: sync.NewCond(bufferedResponsesMtx), bufferedResponsesMtx: bufferedResponsesMtx, bufferedResponses: bufferedResponses, shardMatcher: shardMatcher, + fixedBufferSize: fixedBufferSize, + ringHead: 0, + ringTail: 0, + closed: false, } respSet.storeLabels = make(map[string]struct{}) for _, ls := range storeLabelSets { @@ -378,16 +409,26 @@ func newLazyRespSet( } else { rerr = errors.Wrapf(err, "receive series from %s", st) } - l.span.SetTag("err", rerr.Error()) l.bufferedResponsesMtx.Lock() - l.bufferedResponses = append(l.bufferedResponses, storepb.NewWarnSeriesResponse(rerr)) + for l.isFull() && !l.closed { + l.bufferSlotEvent.Wait() + } + if !l.closed { + l.bufferedResponses[l.ringTail] = storepb.NewWarnSeriesResponse(rerr) + l.ringTail = (l.ringTail + 1) % l.fixedBufferSize + } l.noMoreData = true l.dataOrFinishEvent.Signal() l.bufferedResponsesMtx.Unlock() return false } + if t != nil { + // frameTimeout only applies to cl.Recv() gRPC call because the goroutine may be blocked on waiting for an empty buffer slot. + // Set the timeout to the largest possible value to void triggering it. + t.Reset(time.Duration(math.MaxInt64)) + } numResponses++ bytesProcessed += resp.Size() @@ -401,8 +442,14 @@ func newLazyRespSet( } l.bufferedResponsesMtx.Lock() - l.bufferedResponses = append(l.bufferedResponses, resp) - l.dataOrFinishEvent.Signal() + for l.isFull() && !l.closed { + l.bufferSlotEvent.Wait() + } + if !l.closed { + l.bufferedResponses[l.ringTail] = resp + l.ringTail = (l.ringTail + 1) % l.fixedBufferSize + l.dataOrFinishEvent.Signal() + } l.bufferedResponsesMtx.Unlock() return true } @@ -446,6 +493,7 @@ func newAsyncRespSet( shardInfo *storepb.ShardInfo, logger log.Logger, emptyStreamResponses prometheus.Counter, + lazyRetrievalMaxBufferedResponses int, ) (respSet, error) { var ( @@ -496,6 +544,12 @@ func newAsyncRespSet( switch retrievalStrategy { case LazyRetrieval: + span.SetTag("retrival_strategy", LazyRetrieval) + if lazyRetrievalMaxBufferedResponses < 1 { + // Some unit and e2e tests hit this path. + lazyRetrievalMaxBufferedResponses = 1 + } + return newLazyRespSet( span, frameTimeout, @@ -506,6 +560,7 @@ func newAsyncRespSet( shardMatcher, applySharding, emptyStreamResponses, + lazyRetrievalMaxBufferedResponses, ), nil case EagerRetrieval: return newEagerRespSet( @@ -530,6 +585,8 @@ func (l *lazyRespSet) Close() { defer l.bufferedResponsesMtx.Unlock() l.closeSeries() + l.closed = true + l.bufferSlotEvent.Signal() l.noMoreData = true l.dataOrFinishEvent.Signal() diff --git a/pkg/store/proxy_test.go b/pkg/store/proxy_test.go index dd0ac551ff0..aa4f56dee47 100644 --- a/pkg/store/proxy_test.go +++ b/pkg/store/proxy_test.go @@ -1303,6 +1303,10 @@ func TestProxyStore_SeriesSlowStores(t *testing.T) { expectedWarningsLen: 2, }, } { + + options := []ProxyStoreOption{ + WithLazyRetrievalMaxBufferedResponsesForProxy(1), + } if ok := t.Run(tc.title, func(t *testing.T) { for _, strategy := range []RetrievalStrategy{EagerRetrieval, LazyRetrieval} { if ok := t.Run(string(strategy), func(t *testing.T) { @@ -1312,6 +1316,7 @@ func TestProxyStore_SeriesSlowStores(t *testing.T) { component.Query, tc.selectorLabels, 4*time.Second, strategy, + options..., ) ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) From d52fec72b21facc7134a8cbc970920dceae2931b Mon Sep 17 00:00:00 2001 From: HC Zhu Date: Wed, 4 Jun 2025 10:26:54 -0700 Subject: [PATCH 2/5] Address comments Signed-off-by: HC Zhu --- cmd/thanos/query.go | 2 +- pkg/store/bucket.go | 10 +++------- pkg/store/proxy.go | 5 ++--- pkg/store/proxy_merge.go | 13 ++++--------- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/cmd/thanos/query.go b/cmd/thanos/query.go index 4f60d83583c..20379f0611e 100644 --- a/cmd/thanos/query.go +++ b/cmd/thanos/query.go @@ -203,7 +203,7 @@ func registerQuery(app *extkingpin.App) { strictEndpointGroups := extkingpin.Addrs(cmd.Flag("endpoint-group-strict", "(Deprecated, Experimental): DNS name of statically configured Thanos API server groups (repeatable) that are always used, even if the health check fails.").PlaceHolder("")) lazyRetrievalMaxBufferedResponses := cmd.Flag("query.lazy-retrieval-max-buffered-responses", "The lazy retrieval strategy can buffer up to this number of responses. This is to limit the memory usage. This flag takes effect only when the lazy retrieval strategy is enabled."). - Default("20").Int() + Default("20").Hidden().Int() var storeRateLimits store.SeriesSelectLimits storeRateLimits.RegisterFlags(cmd) diff --git a/pkg/store/bucket.go b/pkg/store/bucket.go index 5d92eac247b..ea7cf5e35a3 100644 --- a/pkg/store/bucket.go +++ b/pkg/store/bucket.go @@ -606,17 +606,13 @@ func WithSeriesMatchRatio(seriesMatchRatio float64) BucketStoreOption { // WithDontResort disables series resorting in Store Gateway. func WithDontResort(true bool) BucketStoreOption { return func(s *BucketStore) { - if true { - s.sortingStrategy = sortingStrategyNone - } + s.sortingStrategy = sortingStrategyNone } } func WithLazyRetrievalMaxBufferedResponsesForBucket(n int) BucketStoreOption { return func(s *BucketStore) { - if true { - s.lazyRetrievalMaxBufferedResponses = n - } + s.lazyRetrievalMaxBufferedResponses = n } } @@ -694,7 +690,7 @@ func NewBucketStore( requestLoggerFunc: NoopRequestLoggerFunc, blockLifecycleCallback: &noopBlockLifecycleCallback{}, - lazyRetrievalMaxBufferedResponses: 1, + lazyRetrievalMaxBufferedResponses: 20, } for _, option := range options { diff --git a/pkg/store/proxy.go b/pkg/store/proxy.go index cbc076c3aab..2c63b6c099a 100644 --- a/pkg/store/proxy.go +++ b/pkg/store/proxy.go @@ -120,9 +120,9 @@ func RegisterStoreServer(storeSrv storepb.StoreServer, logger log.Logger) func(* // ProxyStoreOption are functions that configure the ProxyStore. type ProxyStoreOption func(s *ProxyStore) -func WithLazyRetrievalMaxBufferedResponsesForProxy(buferSize int) ProxyStoreOption { +func WithLazyRetrievalMaxBufferedResponsesForProxy(bufferSize int) ProxyStoreOption { return func(s *ProxyStore) { - s.lazyRetrievalMaxBufferedResponses = buferSize + s.lazyRetrievalMaxBufferedResponses = bufferSize } } @@ -191,7 +191,6 @@ func NewProxyStore( for _, option := range options { option(s) } - return s } diff --git a/pkg/store/proxy_merge.go b/pkg/store/proxy_merge.go index 3968ed97e09..6ab01dc4f6d 100644 --- a/pkg/store/proxy_merge.go +++ b/pkg/store/proxy_merge.go @@ -235,10 +235,6 @@ type lazyRespSet struct { // This a ring buffer of size fixedBufferSize. // A ring buffer of size N can hold N - 1 elements at most in order to distinguish being empty from being full. bufferedResponses []*storepb.SeriesResponse - // ringHead points to the first element in the ring buffer. - // ringTail points to the slot after the last element in the ring buffer. - // if ringHead == ringTail then the buffer is empty. - // if ringHead == (ringTail + 1) % fixedBufferSize then the buffer is full. ringHead int ringTail int closed bool @@ -336,8 +332,7 @@ func newLazyRespSet( ) respSet { // A ring buffer of size N can hold N - 1 elements at most in order to distinguish being empty from being full. // That's why the size is increased by 1 internally. - fixedBufferSize++ - bufferedResponses := make([]*storepb.SeriesResponse, fixedBufferSize) + bufferedResponses := make([]*storepb.SeriesResponse, fixedBufferSize + 1) bufferedResponsesMtx := &sync.Mutex{} dataAvailable := sync.NewCond(bufferedResponsesMtx) @@ -353,7 +348,7 @@ func newLazyRespSet( bufferedResponsesMtx: bufferedResponsesMtx, bufferedResponses: bufferedResponses, shardMatcher: shardMatcher, - fixedBufferSize: fixedBufferSize, + fixedBufferSize: fixedBufferSize + 1, ringHead: 0, ringTail: 0, closed: false, @@ -426,7 +421,7 @@ func newLazyRespSet( } if t != nil { // frameTimeout only applies to cl.Recv() gRPC call because the goroutine may be blocked on waiting for an empty buffer slot. - // Set the timeout to the largest possible value to void triggering it. + // Set the timeout to the largest possible value to avoid triggering it. t.Reset(time.Duration(math.MaxInt64)) } @@ -509,6 +504,7 @@ func newAsyncRespSet( "store.id": storeID, "store.is_local": isLocalStore, "store.addr": storeAddr, + "retrieval_strategy": retrievalStrategy, }) seriesCtx, cancel = context.WithCancel(seriesCtx) @@ -544,7 +540,6 @@ func newAsyncRespSet( switch retrievalStrategy { case LazyRetrieval: - span.SetTag("retrival_strategy", LazyRetrieval) if lazyRetrievalMaxBufferedResponses < 1 { // Some unit and e2e tests hit this path. lazyRetrievalMaxBufferedResponses = 1 From bf35242f34ae4cc29bb6aee2e21c568424a710f9 Mon Sep 17 00:00:00 2001 From: HC Zhu Date: Wed, 4 Jun 2025 10:49:19 -0700 Subject: [PATCH 3/5] Run Gofmt Signed-off-by: HC Zhu --- pkg/store/proxy_merge.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/store/proxy_merge.go b/pkg/store/proxy_merge.go index 6ab01dc4f6d..62a61ef8667 100644 --- a/pkg/store/proxy_merge.go +++ b/pkg/store/proxy_merge.go @@ -234,7 +234,7 @@ type lazyRespSet struct { fixedBufferSize int // This a ring buffer of size fixedBufferSize. // A ring buffer of size N can hold N - 1 elements at most in order to distinguish being empty from being full. - bufferedResponses []*storepb.SeriesResponse + bufferedResponses []*storepb.SeriesResponse ringHead int ringTail int closed bool @@ -332,7 +332,7 @@ func newLazyRespSet( ) respSet { // A ring buffer of size N can hold N - 1 elements at most in order to distinguish being empty from being full. // That's why the size is increased by 1 internally. - bufferedResponses := make([]*storepb.SeriesResponse, fixedBufferSize + 1) + bufferedResponses := make([]*storepb.SeriesResponse, fixedBufferSize+1) bufferedResponsesMtx := &sync.Mutex{} dataAvailable := sync.NewCond(bufferedResponsesMtx) @@ -501,9 +501,9 @@ func newAsyncRespSet( "target": storeAddr, }) span, seriesCtx = tracing.StartSpan(seriesCtx, "proxy.series", tracing.Tags{ - "store.id": storeID, - "store.is_local": isLocalStore, - "store.addr": storeAddr, + "store.id": storeID, + "store.is_local": isLocalStore, + "store.addr": storeAddr, "retrieval_strategy": retrievalStrategy, }) From 0ae653e463b0ca8170e536e2734572b3478865c4 Mon Sep 17 00:00:00 2001 From: HC Zhu Date: Sun, 8 Jun 2025 11:41:57 -0700 Subject: [PATCH 4/5] Address a comment Signed-off-by: HC Zhu --- pkg/store/bucket.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/store/bucket.go b/pkg/store/bucket.go index ea7cf5e35a3..6291f98d512 100644 --- a/pkg/store/bucket.go +++ b/pkg/store/bucket.go @@ -1726,11 +1726,6 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, seriesSrv storepb.Store nil, ) } else { - lazyRetrievalMaxBufferedResponses := s.lazyRetrievalMaxBufferedResponses - if lazyRetrievalMaxBufferedResponses < 1 { - // Some unit and e2e tests hit this path. - lazyRetrievalMaxBufferedResponses = 1 - } resp = newLazyRespSet( span, 10*time.Minute, @@ -1741,7 +1736,7 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, seriesSrv storepb.Store shardMatcher, false, s.metrics.emptyPostingCount.WithLabelValues(tenant), - lazyRetrievalMaxBufferedResponses, + max(s.lazyRetrievalMaxBufferedResponses, 1), ) } From ab3e4318c31123abee018e48de3ad16d86854d4e Mon Sep 17 00:00:00 2001 From: HC Zhu Date: Tue, 10 Jun 2025 18:41:43 -0700 Subject: [PATCH 5/5] Run 'make check-docs' --- CHANGELOG.md | 4 +- docs/components/compact.md | 54 ++++---- docs/components/query-frontend.md | 80 ++++++------ docs/components/query.md | 102 ++++++++-------- docs/components/receive.md | 117 +++++++++--------- docs/components/rule.md | 76 ++++++------ docs/components/sidecar.md | 58 ++++----- docs/components/store.md | 70 +++++------ docs/components/tools.md | 196 +++++++++++++++--------------- 9 files changed, 381 insertions(+), 376 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28662a38c8f..6ef8fd6cf14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -984,11 +984,11 @@ The binaries published with this release are built with Go1.17.8 to avoid [CVE-2 ### Changed -- +- ### Removed -- +- ## [v0.20.0](https://github.com/thanos-io/thanos/releases/tag/v0.20.0) - 2021.04.28 diff --git a/docs/components/compact.md b/docs/components/compact.md index 334b831c2a8..e16803baa90 100644 --- a/docs/components/compact.md +++ b/docs/components/compact.md @@ -288,22 +288,22 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. @@ -312,11 +312,11 @@ Flags: HTTP endpoints. --data-dir="./data" Data directory in which to cache blocks and process compactions. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store @@ -326,15 +326,15 @@ Flags: blocks before they are being processed. Malformed blocks older than the maximum of consistency-delay and 48h0m0s will be removed. - --retention.resolution-raw=0d + --retention.resolution-raw=0d How long to retain raw samples in bucket. Setting this to 0d will retain samples of this resolution forever - --retention.resolution-5m=0d + --retention.resolution-5m=0d How long to retain samples of resolution 1 (5 minutes) in bucket. Setting this to 0d will retain samples of this resolution forever - --retention.resolution-1h=0d + --retention.resolution-1h=0d How long to retain samples of resolution 2 (1 hour) in bucket. Setting this to 0d will retain samples of this resolution forever @@ -343,13 +343,13 @@ Flags: --wait-interval=5m Wait interval between consecutive compaction runs and bucket refreshes. Only works when --wait flag specified. - --[no-]downsampling.disable + --[no-]downsampling.disable Disables downsampling. This is not recommended as querying long time ranges without non-downsampled data is not efficient and useful e.g it is not possible to render all samples for a human eye anyway - --block-discovery-strategy="concurrent" + --block-discovery-strategy="concurrent" One of concurrent, recursive. When set to concurrent, stores will concurrently issue one call per directory to discover active @@ -358,28 +358,28 @@ Flags: recursively traversing into each directory. This avoids N+1 calls at the expense of having slower bucket iterations. - --block-meta-fetch-concurrency=32 + --block-meta-fetch-concurrency=32 Number of goroutines to use when fetching block metadata from object storage. - --block-files-concurrency=1 + --block-files-concurrency=1 Number of goroutines to use when fetching/uploading block files from object storage. - --block-viewer.global.sync-block-interval=1m + --block-viewer.global.sync-block-interval=1m Repeat interval for syncing the blocks between local and remote view for /global Block Viewer UI. - --block-viewer.global.sync-block-timeout=5m + --block-viewer.global.sync-block-timeout=5m Maximum time for syncing the blocks between local and remote view for /global Block Viewer UI. - --compact.cleanup-interval=5m + --compact.cleanup-interval=5m How often we should clean up partially uploaded blocks and blocks with deletion mark in the background when --wait has been enabled. Setting it to "0s" disables it - the cleaning will only happen at the end of an iteration. - --compact.progress-interval=5m + --compact.progress-interval=5m Frequency of calculating the compaction progress in the background when --wait has been enabled. Setting it to "0s" disables it. Now compaction, @@ -387,10 +387,10 @@ Flags: supported. --compact.concurrency=1 Number of goroutines to use when compacting groups. - --compact.blocks-fetch-concurrency=1 + --compact.blocks-fetch-concurrency=1 Number of goroutines to use when download block during compaction. - --downsample.concurrency=1 + --downsample.concurrency=1 Number of goroutines to use when downsampling blocks. --delete-delay=48h Time before a block marked for deletion is @@ -413,7 +413,7 @@ Flags: based deduplication algorithm will be used. At least one replica label has to be set via --deduplication.replica-label flag. - --deduplication.replica-label=DEDUPLICATION.REPLICA-LABEL ... + --deduplication.replica-label=DEDUPLICATION.REPLICA-LABEL ... Experimental. Label to treat as a replica indicator of blocks that can be deduplicated (repeated flag). This will merge multiple @@ -436,14 +436,14 @@ Flags: happen. This permits avoiding downloading some files twice albeit at some performance cost. Possible values are: "", "SHA256". - --min-time=0000-01-01T00:00:00Z + --min-time=0000-01-01T00:00:00Z Start of time range limit to compact. Thanos Compactor will compact only blocks, which happened later than this value. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y. - --max-time=9999-12-31T23:59:59Z + --max-time=9999-12-31T23:59:59Z End of time range limit to compact. Thanos Compactor will compact only blocks, which happened earlier than this value. Option @@ -452,14 +452,14 @@ Flags: or 2h45m. Valid duration units are ms, s, m, h, d, w, y. --[no-]web.disable Disable Block Viewer UI. - --selector.relabel-config-file= + --selector.relabel-config-file= Path to YAML file with relabeling configuration that allows selecting blocks to act on based on their external labels. It follows thanos sharding relabel-config syntax. For format details see: https://thanos.io/tip/thanos/sharding.md/#relabelling - --selector.relabel-config= + --selector.relabel-config= Alternative to 'selector.relabel-config-file' flag (mutually exclusive). Content of YAML file with relabeling configuration that allows @@ -493,10 +493,10 @@ Flags: --[no-]web.disable-cors Whether to disable CORS headers to be set by Thanos. By default Thanos sets CORS headers to be allowed by all. - --bucket-web-label=BUCKET-WEB-LABEL + --bucket-web-label=BUCKET-WEB-LABEL External block label to use as group title in the bucket web UI - --[no-]disable-admin-operations + --[no-]disable-admin-operations Disable UI/API admin operations like marking blocks for deletion and no compaction. diff --git a/docs/components/query-frontend.md b/docs/components/query-frontend.md index 0182921b6b5..8768d38ee1d 100644 --- a/docs/components/query-frontend.md +++ b/docs/components/query-frontend.md @@ -208,22 +208,22 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. @@ -233,39 +233,39 @@ Flags: --[no-]web.disable-cors Whether to disable CORS headers to be set by Thanos. By default Thanos sets CORS headers to be allowed by all. - --[no-]query-range.align-range-with-step + --[no-]query-range.align-range-with-step Mutate incoming queries to align their start and end with their step for better cache-ability. Note: Grafana dashboards do that by default. - --[no-]query-range.request-downsampled + --[no-]query-range.request-downsampled Make additional query for downsampled data in case of empty or incomplete response to range request. - --query-range.split-interval=24h + --query-range.split-interval=24h Split query range requests by an interval and execute in parallel, it should be greater than 0 when query-range.response-cache-config is configured. - --query-range.min-split-interval=0 + --query-range.min-split-interval=0 Split query range requests above this interval in query-range.horizontal-shards requests of equal range. Using this parameter is not allowed with query-range.split-interval. One should also set query-range.split-min-horizontal-shards to a value greater than 1 to enable splitting. - --query-range.max-split-interval=0 + --query-range.max-split-interval=0 Split query range below this interval in query-range.horizontal-shards. Queries with a range longer than this value will be split in multiple requests of this length. - --query-range.horizontal-shards=0 + --query-range.horizontal-shards=0 Split queries in this many requests when query duration is below query-range.max-split-interval. - --query-range.max-retries-per-request=5 + --query-range.max-retries-per-request=5 Maximum number of retries for a single query range request; beyond this, the downstream error is returned. - --[no-]query-frontend.enable-x-functions + --[no-]query-frontend.enable-x-functions Enable experimental x- functions in query-frontend. --no-query-frontend.enable-x-functions for @@ -274,72 +274,72 @@ Flags: options for now: promql-experimental-functions (enables promql experimental functions in query-frontend) - --query-range.max-query-length=0 + --query-range.max-query-length=0 Limit the query time range (end - start time) in the query-frontend, 0 disables it. - --query-range.max-query-parallelism=14 + --query-range.max-query-parallelism=14 Maximum number of query range requests will be scheduled in parallel by the Frontend. - --query-range.response-cache-max-freshness=1m + --query-range.response-cache-max-freshness=1m Most recent allowed cacheable result for query range requests, to prevent caching very recent results that might still be in flux. - --[no-]query-range.partial-response + --[no-]query-range.partial-response Enable partial response for query range requests if no partial_response param is specified. --no-query-range.partial-response for disabling. - --query-range.response-cache-config-file= + --query-range.response-cache-config-file= Path to YAML file that contains response cache configuration. - --query-range.response-cache-config= + --query-range.response-cache-config= Alternative to 'query-range.response-cache-config-file' flag (mutually exclusive). Content of YAML file that contains response cache configuration. - --labels.split-interval=24h + --labels.split-interval=24h Split labels requests by an interval and execute in parallel, it should be greater than 0 when labels.response-cache-config is configured. - --labels.max-retries-per-request=5 + --labels.max-retries-per-request=5 Maximum number of retries for a single label/series API request; beyond this, the downstream error is returned. - --labels.max-query-parallelism=14 + --labels.max-query-parallelism=14 Maximum number of labels requests will be scheduled in parallel by the Frontend. - --labels.response-cache-max-freshness=1m + --labels.response-cache-max-freshness=1m Most recent allowed cacheable result for labels requests, to prevent caching very recent results that might still be in flux. - --[no-]labels.partial-response + --[no-]labels.partial-response Enable partial response for labels requests if no partial_response param is specified. --no-labels.partial-response for disabling. - --labels.default-time-range=24h + --labels.default-time-range=24h The default metadata time range duration for retrieving labels through Labels and Series API when the range parameters are not specified. - --labels.response-cache-config-file= + --labels.response-cache-config-file= Path to YAML file that contains response cache configuration. - --labels.response-cache-config= + --labels.response-cache-config= Alternative to 'labels.response-cache-config-file' flag (mutually exclusive). Content of YAML file that contains response cache configuration. - --cache-compression-type="" + --cache-compression-type="" Use compression in results cache. Supported values are: 'snappy' and ” (disable compression). - --query-frontend.downstream-url="http://localhost:9090" + --query-frontend.downstream-url="http://localhost:9090" URL of downstream Prometheus Query compatible API. - --query-frontend.downstream-tripper-config-file= + --query-frontend.downstream-tripper-config-file= Path to YAML file that contains downstream tripper configuration. If your downstream URL is localhost or 127.0.0.1 then it is highly recommended to increase max_idle_conns_per_host to at least 100. - --query-frontend.downstream-tripper-config= + --query-frontend.downstream-tripper-config= Alternative to 'query-frontend.downstream-tripper-config-file' flag (mutually exclusive). Content of YAML file @@ -347,16 +347,16 @@ Flags: If your downstream URL is localhost or 127.0.0.1 then it is highly recommended to increase max_idle_conns_per_host to at least 100. - --[no-]query-frontend.compress-responses + --[no-]query-frontend.compress-responses Compress HTTP responses. - --query-frontend.log-queries-longer-than=0 + --query-frontend.log-queries-longer-than=0 Log queries that are slower than the specified duration. Set to 0 to disable. Set to < 0 to enable on all queries. - --[no-]query-frontend.force-query-stats + --[no-]query-frontend.force-query-stats Enables query statistics for all queries and will export statistics as logs and service headers. - --query-frontend.org-id-header= ... + --query-frontend.org-id-header= ... Deprecation Warning - This flag will be soon deprecated in favor of query-frontend.tenant-header and both flags @@ -367,25 +367,25 @@ Flags: If multiple headers match the request, the first matching arg specified will take precedence. If no headers match 'anonymous' will be used. - --query-frontend.forward-header= ... + --query-frontend.forward-header= ... List of headers forwarded by the query-frontend to downstream queriers, default is empty - --query-frontend.vertical-shards=QUERY-FRONTEND.VERTICAL-SHARDS + --query-frontend.vertical-shards=QUERY-FRONTEND.VERTICAL-SHARDS Number of shards to use when distributing shardable PromQL queries. For more details, you can refer to the Vertical query sharding proposal: https://thanos.io/tip/proposals-accepted/202205-vertical-query-sharding.md - --query-frontend.slow-query-logs-user-header= + --query-frontend.slow-query-logs-user-header= Set the value of the field remote_user in the slow query logs to the value of the given HTTP header. Falls back to reading the user from the basic auth header. - --request.logging-config-file= + --request.logging-config-file= Path to YAML file with request logging configuration. See format details: https://thanos.io/tip/thanos/logging.md/#configuration - --request.logging-config= + --request.logging-config= Alternative to 'request.logging-config-file' flag (mutually exclusive). Content of YAML file with request logging diff --git a/docs/components/query.md b/docs/components/query.md index e61b58abfae..7a685be5cb0 100644 --- a/docs/components/query.md +++ b/docs/components/query.md @@ -307,29 +307,29 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. - --grpc-address="0.0.0.0:10901" + --grpc-address="0.0.0.0:10901" Listen ip:port address for gRPC endpoints (StoreAPI). Make sure this address is routable from other components. @@ -337,24 +337,24 @@ Flags: disable TLS --grpc-server-tls-key="" TLS Key for the gRPC server, leave blank to disable TLS - --grpc-server-tls-client-ca="" + --grpc-server-tls-client-ca="" TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert) - --grpc-server-tls-min-version="1.3" + --grpc-server-tls-min-version="1.3" TLS supported minimum version for gRPC server. If no version is specified, it'll default to 1.3. Allowed values: ["1.0", "1.1", "1.2", "1.3"] - --grpc-server-max-connection-age=60m + --grpc-server-max-connection-age=60m The grpc server max connection age. This controls how often to re-establish connections and redo TLS handshakes. --grpc-grace-period=2m Time to wait after an interrupt received for GRPC Server. - --[no-]grpc-client-tls-secure + --[no-]grpc-client-tls-secure Use TLS when talking to the gRPC server - --[no-]grpc-client-tls-skip-verify + --[no-]grpc-client-tls-skip-verify Disable TLS certificate verification i.e self signed, signed by fake CA --grpc-client-tls-cert="" TLS Certificates to use to identify this client @@ -362,7 +362,7 @@ Flags: --grpc-client-tls-key="" TLS Key for the client's certificate --grpc-client-tls-ca="" TLS CA Certificates to use to verify gRPC servers - --grpc-client-server-name="" + --grpc-client-server-name="" Server name to verify the hostname on the returned gRPC certificates. See https://tools.ietf.org/html/rfc4366#section-3.1 @@ -396,16 +396,16 @@ Flags: Thanos. By default Thanos sets CORS headers to be allowed by all. --query.timeout=2m Maximum time to process query by query node. - --query.promql-engine=prometheus + --query.promql-engine=prometheus Default PromQL engine to use. - --[no-]query.enable-x-functions + --[no-]query.enable-x-functions Whether to enable extended rate functions (xrate, xincrease and xdelta). Only has effect when used with Thanos engine. --query.mode=local PromQL query mode. One of: local, distributed. --query.max-concurrent=20 Maximum number of queries processed concurrently by query node. - --query.lookback-delta=QUERY.LOOKBACK-DELTA + --query.lookback-delta=QUERY.LOOKBACK-DELTA The maximum lookback duration for retrieving metrics during expression evaluations. PromQL always evaluates the query for the @@ -418,13 +418,13 @@ Flags: This is why lookback delta should be set to at least 2 times of the slowest scrape interval. If unset it will use the promql default of 5m. - --query.max-concurrent-select=4 + --query.max-concurrent-select=4 Maximum number of select requests made concurrently per a query. - --query.conn-metric.label=external_labels... ... + --query.conn-metric.label=external_labels... ... Optional selection of query connection metric labels to be collected from endpoint set - --deduplication.func=penalty + --deduplication.func=penalty Experimental. Deduplication algorithm for merging overlapping series. Possible values are: "penalty", "chain". If no value is @@ -434,7 +434,7 @@ Flags: which performs 1:1 deduplication for samples. At least one replica label has to be set via --query.replica-label flag. - --query.replica-label=QUERY.REPLICA-LABEL ... + --query.replica-label=QUERY.REPLICA-LABEL ... Labels to treat as a replica indicator along which data is deduplicated. Still you will be able to query without deduplication using @@ -442,7 +442,7 @@ Flags: series, recording rules, and alerting rules. Flag may be specified multiple times as well as a comma separated list of labels. - --query.partition-label=QUERY.PARTITION-LABEL ... + --query.partition-label=QUERY.PARTITION-LABEL ... Labels that partition the leaf queriers. This is used to scope down the labelsets of leaf queriers when using the distributed query mode. @@ -455,31 +455,31 @@ Flags: it allows the distributed engine to ignore them for some optimizations. If this is empty then all labels are used as partition labels. - --query.metadata.default-time-range=0s + --query.metadata.default-time-range=0s The default metadata time range duration for retrieving labels through Labels and Series API when the range parameters are not specified. The zero value means range covers the time since the beginning. - --selector-label=="" ... + --selector-label=="" ... Query selector labels that will be exposed in info endpoint (repeated). - --[no-]query.auto-downsampling + --[no-]query.auto-downsampling Enable automatic adjustment (step / 5) to what source of data should be used in store gateways if no max_source_resolution param is specified. - --[no-]query.partial-response + --[no-]query.partial-response Enable partial response for queries if no partial_response param is specified. --no-query.partial-response for disabling. - --query.active-query-path="" + --query.active-query-path="" Directory to log currently active queries in the queries.active file. --enable-feature= ... Comma separated feature names to enable. Valid options for now: promql-experimental-functions (enables promql experimental functions in query) - --query.default-evaluation-interval=1m + --query.default-evaluation-interval=1m Set default evaluation interval for sub queries. --query.default-step=1s Set default step for range queries. Default @@ -489,19 +489,19 @@ Flags: = max(rangeSeconds / 250, defaultStep)). This will not work from Grafana, but Grafana has __step variable which can be used. - --store.response-timeout=0ms + --store.response-timeout=0ms 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. - --selector.relabel-config-file= + --selector.relabel-config-file= Path to YAML file with relabeling configuration that allows selecting blocks to query based on their external labels. It follows the Thanos sharding relabel-config syntax. For format details see: https://thanos.io/tip/thanos/sharding.md/#relabelling - --selector.relabel-config= + --selector.relabel-config= Alternative to 'selector.relabel-config-file' flag (mutually exclusive). Content of YAML file with relabeling configuration that allows @@ -509,61 +509,61 @@ Flags: external labels. It follows the Thanos sharding relabel-config syntax. For format details see: https://thanos.io/tip/thanos/sharding.md/#relabelling - --request.logging-config-file= + --request.logging-config-file= Path to YAML file with request logging configuration. See format details: https://thanos.io/tip/thanos/logging.md/#configuration - --request.logging-config= + --request.logging-config= Alternative to 'request.logging-config-file' flag (mutually exclusive). Content of YAML file with request logging configuration. See format details: https://thanos.io/tip/thanos/logging.md/#configuration - --alert.query-url=ALERT.QUERY-URL + --alert.query-url=ALERT.QUERY-URL The external Thanos Query URL that would be set in all alerts 'Source' field. - --query.telemetry.request-duration-seconds-quantiles=0.1... ... + --query.telemetry.request-duration-seconds-quantiles=0.1... ... The quantiles for exporting metrics about the request duration quantiles. - --query.telemetry.request-samples-quantiles=100... ... + --query.telemetry.request-samples-quantiles=100... ... The quantiles for exporting metrics about the samples count quantiles. - --query.telemetry.request-series-seconds-quantiles=10... ... + --query.telemetry.request-series-seconds-quantiles=10... ... The quantiles for exporting metrics about the series count quantiles. - --query.tenant-header="THANOS-TENANT" + --query.tenant-header="THANOS-TENANT" HTTP header to determine tenant. - --query.default-tenant-id="default-tenant" + --query.default-tenant-id="default-tenant" Default tenant ID to use if tenant header is not present - --query.tenant-certificate-field= + --query.tenant-certificate-field= Use TLS client's certificate field to determine tenant for write requests. Must be one of organization, organizationalUnit or commonName. This setting will cause the query.tenant-header flag value to be ignored. - --[no-]query.enforce-tenancy + --[no-]query.enforce-tenancy Enforce tenancy on Query APIs. Responses are returned only if the label value of the configured tenant-label-name and the value of the tenant header matches. - --query.tenant-label-name="tenant_id" + --query.tenant-label-name="tenant_id" Label name to use when enforcing tenancy (if --query.enforce-tenancy is enabled). - --store.sd-dns-interval=30s + --store.sd-dns-interval=30s Interval between DNS resolutions. - --store.unhealthy-timeout=5m + --store.unhealthy-timeout=5m Timeout before an unhealthy store is cleaned from the store UI page. - --endpoint.sd-config-file= + --endpoint.sd-config-file= Path to Config File with endpoint definitions - --endpoint.sd-config= + --endpoint.sd-config= Alternative to 'endpoint.sd-config-file' flag (mutually exclusive). Content of Config File with endpoint definitions - --endpoint.sd-config-reload-interval=5m + --endpoint.sd-config-reload-interval=5m Interval between endpoint config refreshes - --store.sd-files= ... + --store.sd-files= ... (Deprecated) Path to files that contain addresses of store API servers. The path can be a glob pattern (repeatable). @@ -574,7 +574,7 @@ Flags: The scheme may be prefixed with 'dns+' or 'dnssrv+' to detect Thanos API servers through respective DNS lookups. - --endpoint-group= ... + --endpoint-group= ... (Deprecated, Experimental): DNS name of statically configured Thanos API server groups (repeatable). Targets resolved from the DNS @@ -582,21 +582,21 @@ Flags: of a fanout manner. This flag should be used when connecting a Thanos Query to HA groups of Thanos components. - --endpoint-strict= ... + --endpoint-strict= ... (Deprecated): Addresses of only statically configured Thanos API servers that are always used, even if the health check fails. Useful if you have a caching layer on top. - --endpoint-group-strict= ... + --endpoint-group-strict= ... (Deprecated, Experimental): DNS name of statically configured Thanos API server groups (repeatable) that are always used, even if the health check fails. - --store.limits.request-series=0 + --store.limits.request-series=0 The maximum series allowed for a single Series request. The Series call fails if this limit is exceeded. 0 means no limit. - --store.limits.request-samples=0 + --store.limits.request-samples=0 The maximum samples allowed for a single Series request, The Series call fails if this limit is exceeded. 0 means no limit. diff --git a/docs/components/receive.md b/docs/components/receive.md index 15fc1e73e78..7be4b6c5375 100644 --- a/docs/components/receive.md +++ b/docs/components/receive.md @@ -403,29 +403,29 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. - --grpc-address="0.0.0.0:10901" + --grpc-address="0.0.0.0:10901" Listen ip:port address for gRPC endpoints (StoreAPI). Make sure this address is routable from other components. @@ -433,62 +433,62 @@ Flags: disable TLS --grpc-server-tls-key="" TLS Key for the gRPC server, leave blank to disable TLS - --grpc-server-tls-client-ca="" + --grpc-server-tls-client-ca="" TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert) - --grpc-server-tls-min-version="1.3" + --grpc-server-tls-min-version="1.3" TLS supported minimum version for gRPC server. If no version is specified, it'll default to 1.3. Allowed values: ["1.0", "1.1", "1.2", "1.3"] - --grpc-server-max-connection-age=60m + --grpc-server-max-connection-age=60m The grpc server max connection age. This controls how often to re-establish connections and redo TLS handshakes. --grpc-grace-period=2m Time to wait after an interrupt received for GRPC Server. - --store.limits.request-series=0 + --store.limits.request-series=0 The maximum series allowed for a single Series request. The Series call fails if this limit is exceeded. 0 means no limit. - --store.limits.request-samples=0 + --store.limits.request-samples=0 The maximum samples allowed for a single Series request, The Series call fails if this limit is exceeded. 0 means no limit. NOTE: For efficiency the limit is internally implemented as 'chunks limit' considering each chunk contains a maximum of 120 samples. - --remote-write.address="0.0.0.0:19291" + --remote-write.address="0.0.0.0:19291" Address to listen on for remote write requests. - --remote-write.server-tls-cert="" + --remote-write.server-tls-cert="" TLS Certificate for HTTP server, leave blank to disable TLS. - --remote-write.server-tls-key="" + --remote-write.server-tls-key="" TLS Key for the HTTP server, leave blank to disable TLS. - --remote-write.server-tls-client-ca="" + --remote-write.server-tls-client-ca="" TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert) - --remote-write.server-tls-min-version="1.3" + --remote-write.server-tls-min-version="1.3" TLS version for the gRPC server, leave blank to default to TLS 1.3, allow values: ["1.0", "1.1", "1.2", "1.3"] - --remote-write.client-tls-cert="" + --remote-write.client-tls-cert="" TLS Certificates to use to identify this client to the server. - --remote-write.client-tls-key="" + --remote-write.client-tls-key="" TLS Key for the client's certificate. - --[no-]remote-write.client-tls-secure + --[no-]remote-write.client-tls-secure Use TLS when talking to the other receivers. - --[no-]remote-write.client-tls-skip-verify + --[no-]remote-write.client-tls-skip-verify Disable TLS certificate verification when talking to the other receivers i.e self signed, signed by fake CA. - --remote-write.client-tls-ca="" + --remote-write.client-tls-ca="" TLS CA Certificates to use to verify servers. - --remote-write.client-server-name="" + --remote-write.client-server-name="" Server name to verify the hostname on the returned TLS certificates. See https://tools.ietf.org/html/rfc4366#section-3.1 @@ -496,11 +496,11 @@ Flags: --label=key="value" ... External labels to announce. This flag will be removed in the future when handling multiple tsdb instances is added. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store @@ -514,86 +514,86 @@ Flags: refer to the Tenant lifecycle management section in the Receive documentation: https://thanos.io/tip/components/receive.md/#tenant-lifecycle-management - --receive.hashrings-file= + --receive.hashrings-file= Path to file that contains the hashring configuration. A watcher is initialized to watch changes and update the hashring dynamically. - --receive.hashrings= + --receive.hashrings= Alternative to 'receive.hashrings-file' flag (lower priority). Content of file that contains the hashring configuration. - --receive.hashrings-algorithm=hashmod + --receive.hashrings-algorithm=hashmod The algorithm used when distributing series in the hashrings. Must be one of hashmod, ketama. Will be overwritten by the tenant-specific algorithm in the hashring config. - --receive.hashrings-file-refresh-interval=5m + --receive.hashrings-file-refresh-interval=5m Refresh interval to re-read the hashring configuration file. (used as a fallback) - --receive.local-endpoint=RECEIVE.LOCAL-ENDPOINT + --receive.local-endpoint=RECEIVE.LOCAL-ENDPOINT Endpoint of local receive node. Used to identify the local node in the hashring configuration. If it's empty AND hashring configuration was provided, it means that receive will run in RoutingOnly mode. - --receive.tenant-header="THANOS-TENANT" + --receive.tenant-header="THANOS-TENANT" HTTP header to determine tenant for write requests. - --receive.tenant-certificate-field= + --receive.tenant-certificate-field= Use TLS client's certificate field to determine tenant for write requests. Must be one of organization, organizationalUnit or commonName. This setting will cause the receive.tenant-header flag value to be ignored. - --receive.default-tenant-id="default-tenant" + --receive.default-tenant-id="default-tenant" Default tenant ID to use when none is provided via a header. - --receive.split-tenant-label-name="" + --receive.split-tenant-label-name="" Label name through which the request will be split into multiple tenants. This takes precedence over the HTTP header. - --receive.tenant-label-name="tenant_id" + --receive.tenant-label-name="tenant_id" Label name through which the tenant will be announced. - --receive.replica-header="THANOS-REPLICA" + --receive.replica-header="THANOS-REPLICA" HTTP header specifying the replica number of a write request. - --receive.forward.async-workers=5 + --receive.forward.async-workers=5 Number of concurrent workers processing forwarding of remote-write requests. - --receive.grpc-compression=snappy + --receive.grpc-compression=snappy Compression algorithm to use for gRPC requests to other receivers. Must be one of: snappy, none - --receive.replication-factor=1 + --receive.replication-factor=1 How many times to replicate incoming write requests. - --receive.replication-protocol=protobuf + --receive.replication-protocol=protobuf The protocol to use for replicating remote-write requests. One of protobuf, capnproto - --receive.capnproto-address="0.0.0.0:19391" + --receive.capnproto-address="0.0.0.0:19391" Address for the Cap'n Proto server. - --receive.grpc-service-config= + --receive.grpc-service-config= gRPC service configuration file or content in JSON format. See https://github.com/grpc/grpc/blob/master/doc/service_config.md - --receive.relabel-config-file= + --receive.relabel-config-file= Path to YAML file that contains relabeling configuration. - --receive.relabel-config= + --receive.relabel-config= Alternative to 'receive.relabel-config-file' flag (mutually exclusive). Content of YAML file that contains relabeling configuration. - --tsdb.too-far-in-future.time-window=0s + --tsdb.too-far-in-future.time-window=0s Configures the allowed time window for ingesting samples too far in the future. Disabled (0s) by default. Please note enable this flag will reject samples in the future of receive local NTP time + configured duration due to clock skew in remote write clients. - --tsdb.out-of-order.time-window=0s + --tsdb.out-of-order.time-window=0s [EXPERIMENTAL] Configures the allowed time window for ingestion of out-of-order samples. Disabled (0s) by defaultPlease note if you @@ -601,28 +601,28 @@ Flags: sure you have the --enable-vertical-compaction flag enabled, otherwise you might risk compactor halt. - --tsdb.out-of-order.cap-max=0 + --tsdb.out-of-order.cap-max=0 [EXPERIMENTAL] Configures the maximum capacity for out-of-order chunks (in samples). If set to <=0, default value 32 is assumed. - --[no-]tsdb.allow-overlapping-blocks + --[no-]tsdb.allow-overlapping-blocks Allow overlapping blocks, which in turn enables vertical compaction and vertical query merge. Does not do anything, enabled all the time. - --tsdb.max-retention-bytes=0 + --tsdb.max-retention-bytes=0 Maximum number of bytes that can be stored for blocks. A unit is required, supported units: B, KB, MB, GB, TB, PB, EB. Ex: "512MB". Based on powers-of-2, so 1KB is 1024B. - --[no-]tsdb.wal-compression + --[no-]tsdb.wal-compression Compress the tsdb WAL. --[no-]tsdb.no-lockfile Do not create lockfile in TSDB data directory. In any case, the lockfiles will be deleted on next startup. - --tsdb.head.expanded-postings-cache-size=0 + --tsdb.head.expanded-postings-cache-size=0 [EXPERIMENTAL] If non-zero, enables expanded postings cache for the head block. - --tsdb.block.expanded-postings-cache-size=0 + --tsdb.block.expanded-postings-cache-size=0 [EXPERIMENTAL] If non-zero, enables expanded postings cache for compacted blocks. --tsdb.max-exemplars=0 Enables support for ingesting exemplars and @@ -633,7 +633,7 @@ Flags: ingesting a new exemplar will evict the oldest exemplar from storage. 0 (or less) value of this flag disables exemplars storage. - --[no-]tsdb.enable-native-histograms + --[no-]tsdb.enable-native-histograms [EXPERIMENTAL] Enables the ingestion of native histograms. --hash-func= Specify which hash function to use when @@ -644,25 +644,30 @@ Flags: Possible values are: "", "SHA256". --matcher-cache-size=0 Max number of cached matchers items. Using 0 disables caching. - --request.logging-config-file= + --request.logging-config-file= Path to YAML file with request logging configuration. See format details: https://thanos.io/tip/thanos/logging.md/#configuration - --request.logging-config= + --request.logging-config= Alternative to 'request.logging-config-file' flag (mutually exclusive). Content of YAML file with request logging configuration. See format details: https://thanos.io/tip/thanos/logging.md/#configuration - --[no-]receive.otlp-enable-target-info + --[no-]receive.otlp-enable-target-info Enables target information in OTLP metrics ingested by Receive. If enabled, it converts the resource to the target info metric - --receive.otlp-promote-resource-attributes= ... + --receive.otlp-promote-resource-attributes= ... (Repeatable) Resource attributes to include in OTLP metrics ingested by Receive. --enable-feature= ... Comma separated experimental feature names to enable. The current list of features is metric-names-filter. + --receive.lazy-retrieval-max-buffered-responses=20 + The lazy retrieval strategy can buffer up to + this number of responses. This is to limit the + memory usage. This flag takes effect only when + the lazy retrieval strategy is enabled. ``` diff --git a/docs/components/rule.md b/docs/components/rule.md index edfaddd2438..c20af083f7b 100644 --- a/docs/components/rule.md +++ b/docs/components/rule.md @@ -277,29 +277,29 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. - --grpc-address="0.0.0.0:10901" + --grpc-address="0.0.0.0:10901" Listen ip:port address for gRPC endpoints (StoreAPI). Make sure this address is routable from other components. @@ -307,16 +307,16 @@ Flags: disable TLS --grpc-server-tls-key="" TLS Key for the gRPC server, leave blank to disable TLS - --grpc-server-tls-client-ca="" + --grpc-server-tls-client-ca="" TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert) - --grpc-server-tls-min-version="1.3" + --grpc-server-tls-min-version="1.3" TLS supported minimum version for gRPC server. If no version is specified, it'll default to 1.3. Allowed values: ["1.0", "1.1", "1.2", "1.3"] - --grpc-server-max-connection-age=60m + --grpc-server-max-connection-age=60m The grpc server max connection age. This controls how often to re-establish connections and redo TLS handshakes. @@ -348,7 +348,7 @@ Flags: --[no-]web.disable-cors Whether to disable CORS headers to be set by Thanos. By default Thanos sets CORS headers to be allowed by all. - --[no-]shipper.upload-compacted + --[no-]shipper.upload-compacted If true shipper will try to upload compacted blocks as well. Useful for migration purposes. Works only if compaction is disabled on @@ -360,14 +360,14 @@ Flags: happen. This permits avoiding downloading some files twice albeit at some performance cost. Possible values are: "", "SHA256". - --shipper.meta-file-name="thanos.shipper.json" + --shipper.meta-file-name="thanos.shipper.json" the file to store shipper metadata in --query= ... Addresses of statically configured query API servers (repeatable). The scheme may be prefixed with 'dns+' or 'dnssrv+' to detect query API servers through respective DNS lookups. - --query.config-file= + --query.config-file= Path to YAML file that contains query API servers configuration. See format details: https://thanos.io/tip/components/rule.md/#configuration. @@ -380,27 +380,27 @@ Flags: https://thanos.io/tip/components/rule.md/#configuration. If defined, it takes precedence over the '--query' and '--query.sd-files' flags. - --query.sd-files= ... + --query.sd-files= ... Path to file that contains addresses of query API servers. The path can be a glob pattern (repeatable). --query.sd-interval=5m Refresh interval to re-read file SD files. (used as a fallback) - --query.sd-dns-interval=30s + --query.sd-dns-interval=30s Interval between DNS resolutions. --query.http-method=POST HTTP method to use when sending queries. Possible options: [GET, POST] --query.default-step=1s Default range query step to use. This is only used in stateless Ruler and alert state restoration. - --alertmanagers.config-file= + --alertmanagers.config-file= Path to YAML file that contains alerting configuration. See format details: https://thanos.io/tip/components/rule.md/#configuration. If defined, it takes precedence over the '--alertmanagers.url' and '--alertmanagers.send-timeout' flags. - --alertmanagers.config= + --alertmanagers.config= Alternative to 'alertmanagers.config-file' flag (mutually exclusive). Content of YAML file that contains alerting @@ -409,7 +409,7 @@ Flags: If defined, it takes precedence over the '--alertmanagers.url' and '--alertmanagers.send-timeout' flags. - --alertmanagers.url=ALERTMANAGERS.URL ... + --alertmanagers.url=ALERTMANAGERS.URL ... Alertmanager replica URLs to push firing alerts. Ruler claims success if push to at least one alertmanager from discovered @@ -420,41 +420,41 @@ Flags: lookups. The port defaults to 9093 or the SRV record's value. The URL path is used as a prefix for the regular Alertmanager API path. - --alertmanagers.send-timeout=10s + --alertmanagers.send-timeout=10s Timeout for sending alerts to Alertmanager - --alertmanagers.sd-dns-interval=30s + --alertmanagers.sd-dns-interval=30s Interval between DNS resolutions of Alertmanager hosts. - --alert.query-url=ALERT.QUERY-URL + --alert.query-url=ALERT.QUERY-URL The external Thanos Query URL that would be set in all alerts 'Source' field - --alert.label-drop=ALERT.LABEL-DROP ... + --alert.label-drop=ALERT.LABEL-DROP ... Labels by name to drop before sending to alertmanager. This allows alert to be deduplicated on replica label (repeated). Similar Prometheus alert relabelling - --alert.relabel-config-file= + --alert.relabel-config-file= Path to YAML file that contains alert relabelling configuration. - --alert.relabel-config= + --alert.relabel-config= Alternative to 'alert.relabel-config-file' flag (mutually exclusive). Content of YAML file that contains alert relabelling configuration. - --alert.query-template="/graph?g0.expr={{.Expr}}&g0.tab=1" + --alert.query-template="/graph?g0.expr={{.Expr}}&g0.tab=1" Template to use in alerts source field. Need only include {{.Expr}} parameter - --store.limits.request-series=0 + --store.limits.request-series=0 The maximum series allowed for a single Series request. The Series call fails if this limit is exceeded. 0 means no limit. - --store.limits.request-samples=0 + --store.limits.request-samples=0 The maximum samples allowed for a single Series request, The Series call fails if this limit is exceeded. 0 means no limit. NOTE: For efficiency the limit is internally implemented as 'chunks limit' considering each chunk contains a maximum of 120 samples. - --label=="" ... + --label=="" ... Labels to be applied to all generated metrics (repeated). Similar to external labels for Prometheus, used to identify ruler and its @@ -464,7 +464,7 @@ Flags: --[no-]tsdb.no-lockfile Do not create lockfile in TSDB data directory. In any case, the lockfiles will be deleted on next startup. - --[no-]tsdb.wal-compression + --[no-]tsdb.wal-compression Compress the tsdb WAL. --data-dir="data/" data directory --rule-file=rules/ ... Rule files that should be used by rule @@ -483,19 +483,19 @@ Flags: "for" state. This is maintained only for alerts with configured "for" time greater than grace period. - --restore-ignored-label=RESTORE-IGNORED-LABEL ... + --restore-ignored-label=RESTORE-IGNORED-LABEL ... Label names to be ignored when restoring alerts from the remote storage. This is only used in stateless mode. - --rule-concurrent-evaluation=1 + --rule-concurrent-evaluation=1 How many rules can be evaluated concurrently. Default is 1. - --grpc-query-endpoint= ... + --grpc-query-endpoint= ... Addresses of Thanos gRPC query API servers (repeatable). The scheme may be prefixed with 'dns+' or 'dnssrv+' to detect Thanos API servers through respective DNS lookups. - --[no-]query.enable-x-functions + --[no-]query.enable-x-functions Whether to enable extended rate functions (xrate, xincrease and xdelta). Only has effect when used with Thanos engine. @@ -503,7 +503,7 @@ Flags: options for now: promql-experimental-functions (enables promql experimental functions for ruler) - --remote-write.config-file= + --remote-write.config-file= Path to YAML config for the remote-write configurations, that specify servers where samples should be sent to (see @@ -513,7 +513,7 @@ Flags: ruler's TSDB. If an empty config (or file) is provided, the flag is ignored and ruler is run with its own TSDB. - --remote-write.config= + --remote-write.config= Alternative to 'remote-write.config-file' flag (mutually exclusive). Content of YAML config for the remote-write @@ -525,21 +525,21 @@ Flags: ruler's TSDB. If an empty config (or file) is provided, the flag is ignored and ruler is run with its own TSDB. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --request.logging-config-file= + --request.logging-config-file= Path to YAML file with request logging configuration. See format details: https://thanos.io/tip/thanos/logging.md/#configuration - --request.logging-config= + --request.logging-config= Alternative to 'request.logging-config-file' flag (mutually exclusive). Content of YAML file with request logging diff --git a/docs/components/sidecar.md b/docs/components/sidecar.md index 496ff17a1fc..609367b1a54 100644 --- a/docs/components/sidecar.md +++ b/docs/components/sidecar.md @@ -103,29 +103,29 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. - --grpc-address="0.0.0.0:10901" + --grpc-address="0.0.0.0:10901" Listen ip:port address for gRPC endpoints (StoreAPI). Make sure this address is routable from other components. @@ -133,36 +133,36 @@ Flags: disable TLS --grpc-server-tls-key="" TLS Key for the gRPC server, leave blank to disable TLS - --grpc-server-tls-client-ca="" + --grpc-server-tls-client-ca="" TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert) - --grpc-server-tls-min-version="1.3" + --grpc-server-tls-min-version="1.3" TLS supported minimum version for gRPC server. If no version is specified, it'll default to 1.3. Allowed values: ["1.0", "1.1", "1.2", "1.3"] - --grpc-server-max-connection-age=60m + --grpc-server-max-connection-age=60m The grpc server max connection age. This controls how often to re-establish connections and redo TLS handshakes. --grpc-grace-period=2m Time to wait after an interrupt received for GRPC Server. - --prometheus.url=http://localhost:9090 + --prometheus.url=http://localhost:9090 URL at which to reach Prometheus's API. For better performance use local network. - --prometheus.ready_timeout=10m + --prometheus.ready_timeout=10m Maximum time to wait for the Prometheus instance to start up - --prometheus.get_config_interval=30s + --prometheus.get_config_interval=30s How often to get Prometheus config - --prometheus.get_config_timeout=30s + --prometheus.get_config_timeout=30s Timeout for getting Prometheus config - --prometheus.http-client-file= + --prometheus.http-client-file= Path to YAML file or string with http client configs. See Format details: https://thanos.io/tip/components/sidecar.md/#configuration. - --prometheus.http-client= + --prometheus.http-client= Alternative to 'prometheus.http-client-file' flag (mutually exclusive). Content of YAML file or string with http @@ -170,43 +170,43 @@ Flags: https://thanos.io/tip/components/sidecar.md/#configuration. --tsdb.path="./data" Data directory of TSDB. --reloader.config-file="" Config file watched by the reloader. - --reloader.config-envsubst-file="" + --reloader.config-envsubst-file="" Output file for environment variable substituted config file. - --reloader.rule-dir=RELOADER.RULE-DIR ... + --reloader.rule-dir=RELOADER.RULE-DIR ... Rule directories for the reloader to refresh (repeated field). - --reloader.watch-interval=3m + --reloader.watch-interval=3m Controls how often reloader re-reads config and rules. - --reloader.retry-interval=5s + --reloader.retry-interval=5s Controls how often reloader retries config reload in case of error. --reloader.method=http Method used to reload the configuration. - --reloader.process-name="prometheus" + --reloader.process-name="prometheus" Executable name used to match the process being reloaded when using the signal method. - --request.logging-config-file= + --request.logging-config-file= Path to YAML file with request logging configuration. See format details: https://thanos.io/tip/thanos/logging.md/#configuration - --request.logging-config= + --request.logging-config= Alternative to 'request.logging-config-file' flag (mutually exclusive). Content of YAML file with request logging configuration. See format details: https://thanos.io/tip/thanos/logging.md/#configuration - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --[no-]shipper.upload-compacted + --[no-]shipper.upload-compacted If true shipper will try to upload compacted blocks as well. Useful for migration purposes. Works only if compaction is disabled on @@ -218,20 +218,20 @@ Flags: happen. This permits avoiding downloading some files twice albeit at some performance cost. Possible values are: "", "SHA256". - --shipper.meta-file-name="thanos.shipper.json" + --shipper.meta-file-name="thanos.shipper.json" the file to store shipper metadata in - --store.limits.request-series=0 + --store.limits.request-series=0 The maximum series allowed for a single Series request. The Series call fails if this limit is exceeded. 0 means no limit. - --store.limits.request-samples=0 + --store.limits.request-samples=0 The maximum samples allowed for a single Series request, The Series call fails if this limit is exceeded. 0 means no limit. NOTE: For efficiency the limit is internally implemented as 'chunks limit' considering each chunk contains a maximum of 120 samples. - --min-time=0000-01-01T00:00:00Z + --min-time=0000-01-01T00:00:00Z Start of time range limit to serve. Thanos sidecar will serve only metrics, which happened later than this value. Option can be a constant diff --git a/docs/components/store.md b/docs/components/store.md index b32e7149ebb..fc38cb16f4c 100644 --- a/docs/components/store.md +++ b/docs/components/store.md @@ -56,29 +56,29 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. - --grpc-address="0.0.0.0:10901" + --grpc-address="0.0.0.0:10901" Listen ip:port address for gRPC endpoints (StoreAPI). Make sure this address is routable from other components. @@ -86,26 +86,26 @@ Flags: disable TLS --grpc-server-tls-key="" TLS Key for the gRPC server, leave blank to disable TLS - --grpc-server-tls-client-ca="" + --grpc-server-tls-client-ca="" TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert) - --grpc-server-tls-min-version="1.3" + --grpc-server-tls-min-version="1.3" TLS supported minimum version for gRPC server. If no version is specified, it'll default to 1.3. Allowed values: ["1.0", "1.1", "1.2", "1.3"] - --grpc-server-max-connection-age=60m + --grpc-server-max-connection-age=60m The grpc server max connection age. This controls how often to re-establish connections and redo TLS handshakes. --grpc-grace-period=2m Time to wait after an interrupt received for GRPC Server. - --store.limits.request-series=0 + --store.limits.request-series=0 The maximum series allowed for a single Series request. The Series call fails if this limit is exceeded. 0 means no limit. - --store.limits.request-samples=0 + --store.limits.request-samples=0 The maximum samples allowed for a single Series request, The Series call fails if this limit is exceeded. 0 means no limit. @@ -129,11 +129,11 @@ Flags: --index-cache-size=250MB Maximum size of items held in the in-memory index cache. Ignored if --index-cache.config or --index-cache.config-file option is specified. - --index-cache.config-file= + --index-cache.config-file= Path to YAML file that contains index cache configuration. See format details: https://thanos.io/tip/components/store.md/#index-cache - --index-cache.config= + --index-cache.config= Alternative to 'index-cache.config-file' flag (mutually exclusive). Content of YAML file that contains index cache @@ -142,23 +142,23 @@ Flags: --chunk-pool-size=2GB Maximum size of concurrently allocatable bytes reserved strictly to reuse for chunks in memory. - --store.grpc.touched-series-limit=0 + --store.grpc.touched-series-limit=0 DEPRECATED: use store.limits.request-series. - --store.grpc.series-sample-limit=0 + --store.grpc.series-sample-limit=0 DEPRECATED: use store.limits.request-samples. - --store.grpc.downloaded-bytes-limit=0 + --store.grpc.downloaded-bytes-limit=0 Maximum amount of downloaded (either fetched or touched) bytes in a single Series/LabelNames/LabelValues call. The Series call fails if this limit is exceeded. 0 means no limit. - --store.grpc.series-max-concurrency=20 + --store.grpc.series-max-concurrency=20 Maximum number of concurrent Series calls. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store @@ -166,7 +166,7 @@ Flags: https://thanos.io/tip/thanos/storage.md/#configuration --sync-block-duration=15m Repeat interval for syncing the blocks between local and remote view. - --block-discovery-strategy="concurrent" + --block-discovery-strategy="concurrent" One of concurrent, recursive. When set to concurrent, stores will concurrently issue one call per directory to discover active @@ -175,35 +175,35 @@ Flags: recursively traversing into each directory. This avoids N+1 calls at the expense of having slower bucket iterations. - --block-sync-concurrency=20 + --block-sync-concurrency=20 Number of goroutines to use when constructing index-cache.json blocks from object storage. Must be equal or greater than 1. - --block-meta-fetch-concurrency=32 + --block-meta-fetch-concurrency=32 Number of goroutines to use when fetching block metadata from object storage. - --min-time=0000-01-01T00:00:00Z + --min-time=0000-01-01T00:00:00Z Start of time range limit to serve. Thanos Store will serve only metrics, which happened later than this value. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y. - --max-time=9999-12-31T23:59:59Z + --max-time=9999-12-31T23:59:59Z End of time range limit to serve. Thanos Store will serve only blocks, which happened earlier than this value. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y. - --selector.relabel-config-file= + --selector.relabel-config-file= Path to YAML file with relabeling configuration that allows selecting blocks to act on based on their external labels. It follows thanos sharding relabel-config syntax. For format details see: https://thanos.io/tip/thanos/sharding.md/#relabelling - --selector.relabel-config= + --selector.relabel-config= Alternative to 'selector.relabel-config-file' flag (mutually exclusive). Content of YAML file with relabeling configuration that allows @@ -215,7 +215,7 @@ Flags: being read. Set it to safe value (e.g 30m) if your object storage is eventually consistent. GCS and S3 are (roughly) strongly consistent. - --ignore-deletion-marks-delay=24h + --ignore-deletion-marks-delay=24h Duration after which the blocks marked for deletion will be filtered out while fetching blocks. The idea of ignore-deletion-marks-delay @@ -236,16 +236,16 @@ Flags: blocks before being deleted from bucket. Default is 24h, half of the default value for --delete-delay on compactor. - --[no-]store.enable-index-header-lazy-reader + --[no-]store.enable-index-header-lazy-reader If true, Store Gateway will lazy memory map index-header only once the block is required by a query. - --[no-]store.enable-lazy-expanded-postings + --[no-]store.enable-lazy-expanded-postings If true, Store Gateway will estimate postings size and try to lazily expand postings if it downloads less data than expanding all postings. - --store.posting-group-max-key-series-ratio=100 + --store.posting-group-max-key-series-ratio=100 Mark posting group as lazy if it fetches more keys than R * max series the query should fetch. With R set to 100, a posting group which @@ -257,7 +257,7 @@ Flags: accordingly. This config is only valid if lazy expanded posting is enabled. 0 disables the limit. - --store.index-header-lazy-download-strategy=eager + --store.index-header-lazy-download-strategy=eager Strategy of how to download index headers lazily. Supported values: eager, lazy. If eager, always download index header during @@ -286,19 +286,19 @@ Flags: --[no-]web.disable-cors Whether to disable CORS headers to be set by Thanos. By default Thanos sets CORS headers to be allowed by all. - --bucket-web-label=BUCKET-WEB-LABEL + --bucket-web-label=BUCKET-WEB-LABEL External block label to use as group title in the bucket web UI --matcher-cache-size=0 Max number of cached matchers items. Using 0 disables caching. - --[no-]disable-admin-operations + --[no-]disable-admin-operations Disable UI/API admin operations like marking blocks for deletion and no compaction. - --request.logging-config-file= + --request.logging-config-file= Path to YAML file with request logging configuration. See format details: https://thanos.io/tip/thanos/logging.md/#configuration - --request.logging-config= + --request.logging-config= Alternative to 'request.logging-config-file' flag (mutually exclusive). Content of YAML file with request logging diff --git a/docs/components/tools.md b/docs/components/tools.md index c75225806d0..8c983314914 100644 --- a/docs/components/tools.md +++ b/docs/components/tools.md @@ -18,19 +18,19 @@ Flags: --[no-]version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. @@ -148,26 +148,26 @@ Flags: --[no-]version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: @@ -257,32 +257,32 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. @@ -320,17 +320,17 @@ Flags: remote storage --timeout=5m Timeout to download metadata from remote storage --label=LABEL External block label to use as group title - --[no-]disable-admin-operations + --[no-]disable-admin-operations Disable UI/API admin operations like marking blocks for deletion and no compaction. - --min-time=0000-01-01T00:00:00Z + --min-time=0000-01-01T00:00:00Z Start of time range limit to serve. Thanos tool bucket web will serve only blocks, which happened later than this value. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y. - --max-time=9999-12-31T23:59:59Z + --max-time=9999-12-31T23:59:59Z End of time range limit to serve. Thanos tool bucket web will serve only blocks, which happened earlier than this value. Option @@ -338,14 +338,14 @@ Flags: duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y. - --selector.relabel-config-file= + --selector.relabel-config-file= Path to YAML file with relabeling configuration that allows selecting blocks to act on based on their external labels. It follows thanos sharding relabel-config syntax. For format details see: https://thanos.io/tip/thanos/sharding.md/#relabelling - --selector.relabel-config= + --selector.relabel-config= Alternative to 'selector.relabel-config-file' flag (mutually exclusive). Content of YAML file with relabeling configuration that allows @@ -382,37 +382,37 @@ Flags: --[no-]version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore-backup.config-file= + --objstore-backup.config-file= Path to YAML file that contains object store-backup configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration Used for repair logic to backup blocks before removal. - --objstore-backup.config= + --objstore-backup.config= Alternative to 'objstore-backup.config-file' flag (mutually exclusive). Content of YAML file that contains object store-backup @@ -422,7 +422,7 @@ Flags: removal. -r, --[no-]repair Attempt to repair blocks for which issues were detected - -i, --issues=index_known_issues... ... + -i, --issues=index_known_issues... ... Issues to verify (and optionally repair). Possible issue to verify, without repair: [overlapped_blocks]; Possible issue to verify and repair: @@ -468,38 +468,38 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --selector.relabel-config-file= + --selector.relabel-config-file= Path to YAML file with relabeling configuration that allows selecting blocks to act on based on their external labels. It follows thanos sharding relabel-config syntax. For format details see: https://thanos.io/tip/thanos/sharding.md/#relabelling - --selector.relabel-config= + --selector.relabel-config= Alternative to 'selector.relabel-config-file' flag (mutually exclusive). Content of YAML file with relabeling configuration that allows @@ -511,14 +511,14 @@ Flags: information. Options are 'json', 'wide' or a custom template. --[no-]exclude-delete Exclude blocks marked for deletion. - --min-time=0000-01-01T00:00:00Z + --min-time=0000-01-01T00:00:00Z Start of time range limit to list blocks. Thanos Tools will list blocks, which were created later than this value. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y. - --max-time=9999-12-31T23:59:59Z + --max-time=9999-12-31T23:59:59Z End of time range limit to list. Thanos Tools will list only blocks, which were created earlier than this value. Option can be a constant time in @@ -552,32 +552,32 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - -l, --selector==\"\" ... + -l, --selector==\"\" ... Selects blocks based on label, e.g. '-l key1=\"value1\" -l key2=\"value2\"'. All key value pairs must match. @@ -617,44 +617,44 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. - --objstore-to.config-file= + --objstore-to.config-file= Path to YAML file that contains object store-to configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration The object storage which replicate data to. - --objstore-to.config= + --objstore-to.config= Alternative to 'objstore-to.config-file' flag (mutually exclusive). Content of YAML file that contains object store-to @@ -667,7 +667,7 @@ Flags: will be replicated. --compaction-max=4 Only blocks up to a maximum of this compaction level will be replicated. - --compaction=COMPACTION ... + --compaction=COMPACTION ... Only blocks with these compaction levels will be replicated. Repeated flag. Overrides compaction-min and compaction-max if set. @@ -675,14 +675,14 @@ Flags: will be replicated. All Prometheus matchers are supported, including =, !=, =~ and !~. --[no-]single-run Run replication only one time, then exit. - --min-time=0000-01-01T00:00:00Z + --min-time=0000-01-01T00:00:00Z Start of time range limit to replicate. Thanos Replicate will replicate only metrics, which happened later than this value. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y. - --max-time=9999-12-31T23:59:59Z + --max-time=9999-12-31T23:59:59Z End of time range limit to replicate. Thanos Replicate will replicate only metrics, which happened earlier than this value. Option can be a @@ -694,7 +694,7 @@ Flags: matchers will be ignored. When specified, this command will be run only once after successful replication. Repeated field - --[no-]ignore-marked-for-deletion + --[no-]ignore-marked-for-deletion Do not replicate blocks that have deletion mark. ``` @@ -752,32 +752,32 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. @@ -785,10 +785,10 @@ Flags: that can enable TLS or authentication for all HTTP endpoints. --wait-interval=5m Wait interval between downsample runs. - --downsample.concurrency=1 + --downsample.concurrency=1 Number of goroutines to use when downsampling blocks. - --block-files-concurrency=1 + --block-files-concurrency=1 Number of goroutines to use when fetching/uploading block files from object storage. @@ -859,26 +859,26 @@ Flags: --[no-]version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: @@ -941,32 +941,32 @@ Flags: --[no-]version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration --id=ID ... ID (ULID) of the blocks for rewrite (repeated flag). - --tmp.dir="/tmp/thanos-rewrite" + --tmp.dir="/var/folders/w2/gv534ry17sxdysw2ynbwv5gh0000gn/T/thanos-rewrite" Working directory for temporary files --[no-]dry-run Prints the series changes instead of doing them. Defaults to true, for user to double check. (: @@ -982,24 +982,24 @@ Flags: been specified, it does not happen. This permits avoiding downloading some files twice albeit at some performance cost. Possible values are: "", "SHA256". - --rewrite.to-delete-config-file= + --rewrite.to-delete-config-file= Path to YAML file that contains []metadata.DeletionRequest that will be applied to blocks - --rewrite.to-delete-config= + --rewrite.to-delete-config= Alternative to 'rewrite.to-delete-config-file' flag (mutually exclusive). Content of YAML file that contains []metadata.DeletionRequest that will be applied to blocks - --rewrite.to-relabel-config-file= + --rewrite.to-relabel-config-file= Path to YAML file that contains relabel configs that will be applied to blocks - --rewrite.to-relabel-config= + --rewrite.to-relabel-config= Alternative to 'rewrite.to-relabel-config-file' flag (mutually exclusive). Content of YAML file that contains relabel configs that will be applied to blocks - --[no-]rewrite.add-change-log + --[no-]rewrite.add-change-log If specified, all modifications are written to new block directory. Disable if latency is to high. @@ -1022,26 +1022,26 @@ Flags: --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/tip/thanos/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (mutually exclusive). Content of YAML file that contains object store @@ -1082,19 +1082,19 @@ Flags: --[no-]version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. Possible options: logfmt or json. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (mutually exclusive). Content of YAML file with tracing configuration. See format details: https://thanos.io/tip/thanos/tracing.md/#configuration - --[no-]enable-auto-gomemlimit + --[no-]enable-auto-gomemlimit Enable go runtime to automatically limit memory consumption. - --auto-gomemlimit.ratio=0.9 + --auto-gomemlimit.ratio=0.9 The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. --rules=RULES ... The rule files glob to check (repeated).