The `storage_config` block configures one of many possible stores for both the index and chunks. Which configuration to be picked should be defined in schema_config block.
@ -2083,7 +2022,7 @@ bigtable:
[instance: <string> | default = ""]
# The grpc_client block configures the gRPC client used to communicate between
# two Loki components.
# a client and server component in Loki.
# The CLI flags prefix for this block configuration is: bigtable
[grpc_client_config: <grpc_client>]
@ -2328,7 +2267,8 @@ congestion_control:
# CLI flag: -store.object-prefix
[object_prefix: <string> | default = ""]
# The cache block configures the cache backend.
# The cache_config block configures the cache backend for a specific Loki
# component.
# The CLI flags prefix for this block configuration is: store.index-cache-read
[index_queries_cache_config: <cache_config>]
@ -2373,7 +2313,7 @@ boltdb_shipper:
index_gateway_client:
# The grpc_client block configures the gRPC client used to communicate
# between two Loki components.
# between a client and server component in Loki.
# The CLI flags prefix for this block configuration is:
# boltdb.shipper.index-gateway-client.grpc
[grpc_client_config: <grpc_client>]
@ -2428,7 +2368,7 @@ tsdb_shipper:
index_gateway_client:
# The grpc_client block configures the gRPC client used to communicate
# between two Loki components.
# between a client and server component in Loki.
# The CLI flags prefix for this block configuration is:
# tsdb.shipper.index-gateway-client.grpc
[grpc_client_config: <grpc_client>]
@ -2451,8 +2391,8 @@ tsdb_shipper:
[ingesterdbretainperiod: <duration>]
# Configures the bloom shipper component, which contains the store abstraction
# to fetch bloom filters from and put them to object storage.
# Experimental: Configures the bloom shipper component, which contains the store
# abstraction to fetch bloom filters from and put them to object storage.
bloom_shipper:
# Working directory to store downloaded bloom blocks. Supports multiple
# directories, separated by comma.
@ -2464,9 +2404,10 @@ bloom_shipper:
# CLI flag: -bloom.max-query-page-size
[max_query_page_size: <int> | default = 64MiB]
# The amount of maximum concurrent bloom blocks downloads.
# The amount of maximum concurrent bloom blocks downloads. Usually set to 2x
# number of CPU cores.
# CLI flag: -bloom.download-parallelism
[download_parallelism: <int> | default = 16]
[download_parallelism: <int> | default = 8]
blocks_cache:
# Cache for bloom blocks. Soft limit of the cache in bytes. Exceeding this
@ -2485,7 +2426,8 @@ bloom_shipper:
# CLI flag: -bloom.blocks-cache.ttl
[ttl: <duration> | default = 24h]
# The cache block configures the cache backend.
# The cache_config block configures the cache backend for a specific Loki
# component.
# The CLI flags prefix for this block configuration is: bloom.metas-cache
[metas_cache: <cache_config>]
```
@ -2495,11 +2437,13 @@ bloom_shipper:
The `chunk_store_config` block configures how chunks will be cached and how long to wait before saving them to the backing store.
```yaml
# The cache block configures the cache backend.
# The cache_config block configures the cache backend for a specific Loki
# component.
# The CLI flags prefix for this block configuration is: store.chunks-cache
[chunk_cache_config: <cache_config>]
# The cache block configures the cache backend.
# The cache_config block configures the cache backend for a specific Loki
# component.
# The CLI flags prefix for this block configuration is: store.chunks-cache-l2
[chunk_cache_config_l2: <cache_config>]
@ -2699,7 +2643,7 @@ compactor_ring:
### bloom_compactor
The `bloom_compactor` block configures the Loki bloom compactor server, responsible for compacting stream indexes into bloom filters and merging them as bloom blocks
Experimental: The `bloom_compactor` block configures the Loki bloom compactor server, responsible for compacting stream indexes into bloom filters and merging them as bloom blocks.
```yaml
# Defines the ring to be used by the bloom-compactor servers. In case this isn't
@ -2845,6 +2789,77 @@ retention:
[max_lookback_days: <int> | default = 365]
```
### bloom_gateway
Experimental: The `bloom_gateway` block configures the Loki bloom gateway server, responsible for serving queries for filtering chunks based on filter expressions.
```yaml
# Flag to enable or disable the bloom gateway component globally.
# CLI flag: -bloom-gateway.enabled
[enabled: <boolean> | default = false]
client:
# Configures the behavior of the connection pool.
pool_config:
# How frequently to clean up clients for servers that have gone away or are
The `limits_config` block configures global and per-tenant limits in Loki. The values here can be overridden in the `overrides` section of the runtime_config file
@ -3308,54 +3323,54 @@ shard_streams:
# CLI flag: -index-gateway.shard-size
[index_gateway_shard_size: <int> | default = 0]
# The shard size defines how many bloom gateways should be used by a tenant for
# querying.
# Experimental. The shard size defines how many bloom gateways should be used by
# a tenant for querying.
# CLI flag: -bloom-gateway.shard-size
[bloom_gateway_shard_size: <int> | default = 0]
# Whether to use the bloom gateway component in the read path to filter chunks.
# Experimental. Whether to use the bloom gateway component in the read path to
@ -3419,8 +3434,8 @@ The `frontend_worker` configures the worker - running within the Loki querier -
# CLI flag: -querier.id
[id: <string> | default = ""]
# The grpc_client block configures the gRPC client used to communicate between
# two Loki components.
# The grpc_client block configures the gRPC client used to communicate between a
# client and server component in Loki.
# The CLI flags prefix for this block configuration is: querier.frontend-client
[grpc_client_config: <grpc_client>]
```
@ -4396,7 +4411,7 @@ When a memberlist config with atleast 1 join_members is defined, kvstore of type
### grpc_client
The `grpc_client` block configures the gRPC client used to communicate between two Loki components. The supported CLI flags `<prefix>` used to reference this configuration block are:
The `grpc_client` block configures the gRPC client used to communicate between a client and server component in Loki. The supported CLI flags `<prefix>` used to reference this configuration block are:
- `bigtable`
- `bloom-gateway-client.grpc`
@ -4614,7 +4629,7 @@ The TLS configuration.
### cache_config
The cache block configures the cache backend. The supported CLI flags `<prefix>` used to reference this configuration block are:
The `cache_config` block configures the cache backend for a specific Loki component. The supported CLI flags `<prefix>` used to reference this configuration block are:
f.BoolVar(&cfg.Enabled,prefix+"enabled",false,"Flag to enable or disable the bloom gateway component globally.")
f.IntVar(&cfg.WorkerConcurrency,prefix+"worker-concurrency",4,"Number of workers to use for filtering chunks concurrently.")
f.IntVar(&cfg.BlockQueryConcurrency,prefix+"block-query-concurrency",4,"Number of blocks processed concurrently on a single worker.")
f.IntVar(&cfg.WorkerConcurrency,prefix+"worker-concurrency",4,"Number of workers to use for filtering chunks concurrently. Usually set to 1x number of CPU cores.")
f.IntVar(&cfg.BlockQueryConcurrency,prefix+"block-query-concurrency",8,"Number of blocks processed concurrently on a single worker. Usually set to 2x number of CPU cores.")
f.IntVar(&cfg.MaxOutstandingPerTenant,prefix+"max-outstanding-per-tenant",1024,"Maximum number of outstanding tasks per tenant.")
f.IntVar(&cfg.NumMultiplexItems,prefix+"num-multiplex-tasks",512,"How many tasks are multiplexed at once.")
// TODO(chaudum): Figure out what the better place is for registering flags
BoltDBShipperConfigboltdb.IndexCfg`yaml:"boltdb_shipper" doc:"description=Configures storing index in an Object Store (GCS/S3/Azure/Swift/COS/Filesystem) in the form of boltdb files. Required fields only required when boltdb-shipper is defined in config."`
TSDBShipperConfigindexshipper.Config`yaml:"tsdb_shipper" doc:"description=Configures storing index in an Object Store (GCS/S3/Azure/Swift/COS/Filesystem) in a prometheus TSDB-like format. Required fields only required when TSDB is defined in config."`
BloomShipperConfigbloomshipperconfig.Config`yaml:"bloom_shipper" doc:"description=Configures the bloom shipper component, which contains the store abstraction to fetch bloom filters from and put them to object storage."`
BloomShipperConfigbloomshipperconfig.Config`yaml:"bloom_shipper" category:"experimental" doc:"description=Experimental: Configures the bloom shipper component, which contains the store abstraction to fetch bloom filters from and put them to object storage."`
// Config for using AsyncStore when using async index stores like `boltdb-shipper`.
// It is required for getting chunk ids of recently flushed chunks from the ingesters.
f.Var(&c.WorkingDirectory,prefix+"shipper.working-directory","Working directory to store downloaded bloom blocks. Supports multiple directories, separated by comma.")
_=c.MaxQueryPageSize.Set("64MiB")// default should match the one set in pkg/storage/bloom/v1/bloom.go
f.Var(&c.MaxQueryPageSize,prefix+"max-query-page-size","Maximum size of bloom pages that should be queried. Larger pages than this limit are skipped when querying blooms to limit memory usage.")
f.IntVar(&c.DownloadParallelism,prefix+"download-parallelism",16,"The amount of maximum concurrent bloom blocks downloads.")
f.IntVar(&c.DownloadParallelism,prefix+"download-parallelism",8,"The amount of maximum concurrent bloom blocks downloads. Usually set to 2x number of CPU cores.")
c.BlocksCache.RegisterFlagsWithPrefixAndDefaults(prefix+"blocks-cache.","Cache for bloom blocks. ",f,24*time.Hour)
c.MetasCache.RegisterFlagsWithPrefix(prefix+"metas-cache.","Cache for bloom metas. ",f)
AllowStructuredMetadatabool`yaml:"allow_structured_metadata,omitempty" json:"allow_structured_metadata,omitempty" doc:"description=Allow user to send structured metadata in push payload."`
MaxStructuredMetadataSizeflagext.ByteSize`yaml:"max_structured_metadata_size" json:"max_structured_metadata_size" doc:"description=Maximum size accepted for structured metadata per log line."`
f.IntVar(&l.IndexGatewayShardSize,"index-gateway.shard-size",0,"The shard size defines how many index gateways should be used by a tenant for querying. If the global shard factor is 0, the global shard factor is set to the deprecated -replication-factor for backwards compatibility reasons.")
f.IntVar(&l.BloomGatewayShardSize,"bloom-gateway.shard-size",0,"The shard size defines how many bloom gateways should be used by a tenant for querying.")
f.BoolVar(&l.BloomGatewayEnabled,"bloom-gateway.enable-filtering",false,"Whether to use the bloom gateway component in the read path to filter chunks.")
f.IntVar(&l.BloomCompactorShardSize,"bloom-compactor.shard-size",0,"The shard size defines how many bloom compactors should be used by a tenant when computing blooms. If it's set to 0, shuffle sharding is disabled.")
f.BoolVar(&l.BloomCompactorEnabled,"bloom-compactor.enable-compaction",false,"Whether to compact chunks into bloom filters.")
f.IntVar(&l.BloomNGramLength,"bloom-compactor.ngram-length",4,"Length of the n-grams created when computing blooms from log lines.")
f.IntVar(&l.BloomNGramSkip,"bloom-compactor.ngram-skip",1,"Skip factor for the n-grams created when computing blooms from log lines.")
f.StringVar(&l.BloomBlockEncoding,"bloom-compactor.block-encoding","none","Compression algorithm for bloom block pages.")
f.IntVar(&l.BloomGatewayBlocksDownloadingParallelism,"bloom-gateway.blocks-downloading-parallelism",50,"Maximum number of blocks will be downloaded in parallel by the Bloom Gateway.")
f.DurationVar(&l.BloomGatewayCacheKeyInterval,"bloom-gateway.cache-key-interval",15*time.Minute,"Interval for computing the cache key in the Bloom Gateway.")
f.IntVar(&l.BloomGatewayShardSize,"bloom-gateway.shard-size",0,"Experimental. The shard size defines how many bloom gateways should be used by a tenant for querying.")
f.BoolVar(&l.BloomGatewayEnabled,"bloom-gateway.enable-filtering",false,"Experimental. Whether to use the bloom gateway component in the read path to filter chunks.")
f.IntVar(&l.BloomCompactorShardSize,"bloom-compactor.shard-size",0,"Experimental. The shard size defines how many bloom compactors should be used by a tenant when computing blooms. If it's set to 0, shuffle sharding is disabled.")
f.BoolVar(&l.BloomCompactorEnabled,"bloom-compactor.enable-compaction",false,"Experimental. Whether to compact chunks into bloom filters.")
f.IntVar(&l.BloomNGramLength,"bloom-compactor.ngram-length",4,"Experimental. Length of the n-grams created when computing blooms from log lines.")
f.IntVar(&l.BloomNGramSkip,"bloom-compactor.ngram-skip",1,"Experimental. Skip factor for the n-grams created when computing blooms from log lines.")
f.StringVar(&l.BloomBlockEncoding,"bloom-compactor.block-encoding","none","Experimental. Compression algorithm for bloom block pages.")
f.DurationVar(&l.BloomGatewayCacheKeyInterval,"bloom-gateway.cache-key-interval",15*time.Minute,"Experimental. Interval for computing the cache key in the Bloom Gateway.")
"The maximum bloom block size. A value of 0 sets an unlimited size. Default is %s. The actual block size might exceed this limit since blooms will be added to blocks until the block exceeds the maximum block size.",
"Experimental. The maximum bloom block size. A value of 0 sets an unlimited size. Default is %s. The actual block size might exceed this limit since blooms will be added to blocks until the block exceeds the maximum block size.",
defaultBloomCompactorMaxBlockSize,
),
)
@ -938,10 +937,6 @@ func (o *Overrides) BloomGatewayShardSize(userID string) int {
Desc:"The index_gateway block configures the Loki index gateway server, responsible for serving index queries without the need to constantly interact with the object store.",
Desc:"The bloom_gateway block configures the Loki bloom gateway server, responsible for serving queries for filtering chunks based on filter expressions.",
Desc:"The bloom_compactor block configures the Loki bloom compactor server, responsible for compacting stream indexes into bloom filters and merging them as bloom blocks",
Desc:"Experimental: The bloom_compactor block configures the Loki bloom compactor server, responsible for compacting stream indexes into bloom filters and merging them as bloom blocks.",
Desc:"Experimental: The bloom_gateway block configures the Loki bloom gateway server, responsible for serving queries for filtering chunks based on filter expressions.",
},
{
Name:"limits_config",
@ -197,7 +197,7 @@ When a memberlist config with atleast 1 join_members is defined, kvstore of type