Project: Grafana Loki (Observability and Analysis / Observability)
File: configuration.md

description: Configuration reference for the parameters used to configure Grafana Loki. title: Grafana Loki configuration parameters <!-- DO NOT EDIT THIS FILE - This file has been automatically generated from its .template, regenerate with `make doc` from root directory. --> If you pass Loki the flag `-print-config-stderr` or `-log-config-reverse-order`, (or `-print-config-stderr=true`) Loki will dump the entire config object it has created from the built-in defaults combined first with overrides from config file, and second by overrides from flags. The result is the value for every config object in the Loki config struct, which is very large... Many values will not be relevant to your install such as storage configs which you are not using and which you did not define, this is expected as every option has a default value if it is being used or not. This config is what Loki will use to run, it can be invaluable for debugging issues related to configuration and is especially useful in making sure your config files and flags are being read and loaded properly. `-print-config-stderr` is nice when running Loki directly e.g. `./loki ` as you can get a quick output of the entire Loki config. `-log-config-reverse-order` is the flag we run Loki with in all our environments, the config entries are reversed so that the order of configs reads correctly top to bottom when viewed in Grafana's Explore. To specify which configuration file to load, pass the `-config.file` flag at the command line. The value can be a list of comma separated paths, then the first file that exists will be used. If no `-config.file` argument is specified, Loki will look up the `config.yaml` in the current working directory and the `config/` subdirectory and try to use that. The file is written in [YAML format](https://en.wikipedia.org/wiki/YAML), defined by the scheme below. Brackets indicate that a parameter is optional. For non-list parameters the value is set to the specified default. Note: This feature is only available in Loki 2.1+. You can use environment variable references in the configuration file to set values that need to be configurable during deployment. To do this, pass `-config.expand-env=true` and use: ``` ${VAR} ``` Where VAR is the name of the environment variable. Each variable reference is replaced at startup by the value of the environment variable. The replacement is case-sensitive and occurs before the YAML file is parsed. References to undefined variables are replaced by empty strings unless you specify a default value or custom error text. To specify a default value, use: ``` ${VAR:-default_value} ``` Where default_value is the value to use if the environment variable is undefined. Pass the `-config.expand-env` flag at the command line to enable this way of setting configs. `<boolean>` : a boolean that can take the values `true` or `false` `<int>` : any integer matching the regular expression `[1-9]+[0-9]*` `<duration>` : a duration matching the regular expression `[0-9]+(ns|us|s|ms|[smh])` `<labelname>` : a string matching the regular expression `*` `<labelvalue>` : a string of unicode characters `<filename>` : a valid path relative to current working directory or an absolute

`<host>` : a valid string consisting of a hostname or IP followed by an optional port number `<string>` : a string `<secret>` : a string that represents a secret, such as a password ```yaml [target: <string> | default = "all"] [auth_enabled: <boolean> | default = true] [ballast_bytes: <int> | default = 0] [server: <server>] [distributor: <distributor>] [querier: <querier>] [queryscheduler: <queryscheduler>] [frontend: <frontend>] [queryrange: <queryrange>] [ruler: <ruler>] [ingesterclient: <ingesterclient>] [ingester: <ingester>] pattern_ingester: [enabled: <boolean> | default = false] lifecycler: ring: kvstore: [store: <string> | default = "consul"] [prefix: <string> | default = "collectors/"] [consul: <consul>] [etcd: <etcd>] multi: [primary: <string> | default = ""] [secondary: <string> | default = ""] [mirror_enabled: <boolean> | default = false] [mirror_timeout: <duration> | default = 2s] [heartbeat_timeout: <duration> | default = 1m] [replication_factor: <int> | default = 1] [zoneawarenessenabled: <boolean> | default = false] [excluded_zones: <string> | default = ""] [num_tokens: <int> | default = 128] [heartbeat_period: <duration> | default = 5s] [heartbeat_timeout: <duration> | default = 1m] [observe_period: <duration> | default = 0s] [join_after: <duration> | default = 0s] [minreadyduration: <duration> | default = 15s] [interface_names: <list of strings> | default = [<private network interfaces>]] [enable_inet6: <boolean> | default = false] [final_sleep: <duration> | default = 0s] [tokensfilepath: <string> | default = ""] [availability_zone: <string> | default = ""] [unregisteronshutdown: <boolean> | default = true] [readinesscheckring_health: <boolean> | default = true] [address: <string> | default = ""] [port: <int> | default = 0] [id: <string> | default = "<hostname>"] client_config: pool_config: [clientcleanupperiod: <duration> | default = 15s] [healthcheckingesters: <boolean> | default = true] [remote_timeout: <duration> | default = 1s] [remote_timeout: <duration> | default = 5s] [grpcclientconfig: <grpc_client>] [concurrent_flushes: <int> | default = 32] [flushcheckperiod: <duration> | default = 30s] [indexgateway: <indexgateway>] [bloomcompactor: <bloomcompactor>] [bloomgateway: <bloomgateway>] [storageconfig: <storageconfig>] [chunkstoreconfig: <chunkstoreconfig>] [schemaconfig: <schemaconfig>] [compactor: <compactor>] compactorgrpcclient: [maxrecvmsg_size: <int> | default = 104857600] [maxsendmsg_size: <int> | default = 104857600] [grpc_compression: <string> | default = ""] [rate_limit: <float> | default = 0] [ratelimitburst: <int> | default = 0] [backoffonratelimits: <boolean> | default = false] backoff_config: [min_period: <duration> | default = 100ms] [max_period: <duration> | default = 10s] [max_retries: <int> | default = 10] [initialstreamwindow_size: <int> | default = 63KiB1023B] [initialconnectionwindow_size: <int> | default = 63KiB1023B] [tls_enabled: <boolean> | default = false] [tlscertpath: <string> | default = ""] [tlskeypath: <string> | default = ""] [tlscapath: <string> | default = ""] [tlsservername: <string> | default = ""] [tlsinsecureskip_verify: <boolean> | default = false] [tlsciphersuites: <string> | default = ""] [tlsminversion: <string> | default = ""] [connect_timeout: <duration> | default = 5s] [connectbackoffbase_delay: <duration> | default = 1s] [connectbackoffmax_delay: <duration> | default = 5s] [limitsconfig: <limitsconfig>] [frontendworker: <frontendworker>] [tablemanager: <tablemanager>] [memberlist: <memberlist>] [runtimeconfig: <runtimeconfig>] [operationalconfig: <operationalconfig>] [tracing: <tracing>] [analytics: <analytics>] [common: <common>] [shutdown_delay: <duration> | default = 0s] [metrics_namespace: <string> | default = "loki"] ``` The `alibabacloudstorageconfig` block configures the connection to Alibaba Cloud Storage object storage backend. The supported CLI flags `<prefix>` used to reference this configuration block are: `common` `ruler` &nbsp; ```yaml [bucket: <string> | default = ""] [endpoint: <string> | default = ""] [accesskeyid: <string> | default = ""] [secretaccesskey: <string> | default = ""] ``` Configuration for `analytics`. ```yaml [reporting_enabled: <boolean> | default = true] [usagestatsurl: <string> | default = "https://stats.grafana.org/loki-usage-report"] ``` Define actions for matching OpenTelemetry (OTEL) attributes. ```yaml [action: <string> | default = ""] [attributes: <list of strings>] [regex: <Regexp>] ``` The `awsstorageconfig` block configures the connection to dynamoDB and S3 object storage. Either one of them or both can be configured. ```yaml dynamodb: [dynamodb_url: <url>] [api_limit: <float> | default = 2] [throttle_limit: <float> | default = 10] metrics: [url: <string> | default = ""] [targetqueuelength: <int> | default = 100000] [scaleupfactor: <float> | default = 1.3] [ignorethrottlebelow: <float> | default = 1] [queuelengthquery: <string> | default = "sum(avgovertime(lokiingesterflushqueuelength{job=\"cortex/ingester\"}[2m])) or sum(avgovertime(cortexingesterflushqueuelength{job=\"cortex/ingester\"}[2m]))"] [writethrottlequery: <string> | default = "sum(rate(cortexdynamothrottled_total{operation=\"DynamoDB.BatchWriteItem\"}[1m])) by (table) > 0"] [writeusagequery: <string> | default = "sum(rate(cortexdynamoconsumedcapacitytotal{operation=\"DynamoDB.BatchWriteItem\"}[15m])) by (table) > 0"] [readusagequery: <string> | default =

by (table) > 0"] [readerrorquery: <string> | default = "sum(increase(cortexdynamofailures_total{operation=\"DynamoDB.QueryPages\",error=\"ProvisionedThroughputExceededException\"}[1m])) by (table) > 0"] [chunkgangsize: <int> | default = 10] [chunkgetmax_parallelism: <int> | default = 32] backoff_config: [min_period: <duration> | default = 100ms] [max_period: <duration> | default = 50s] [max_retries: <int> | default = 20] [kmskeyid: <string> | default = ""] [s3: <url>] [s3forcepathstyle: <boolean> | default = false] [bucketnames: <string> | default = ""] [endpoint: <string> | default = ""] [region: <string> | default = ""] [accesskeyid: <string> | default = ""] [secretaccesskey: <string> | default = ""] [session_token: <string> | default = ""] [insecure: <boolean> | default = false] http_config: [timeout: <duration> | default = 0s] [idleconntimeout: <duration> | default = 1m30s] [responseheadertimeout: <duration> | default = 0s] [insecureskipverify: <boolean> | default = false] [ca_file: <string> | default = ""] [signature_version: <string> | default = "v4"] [storage_class: <string> | default = "STANDARD"] sse: [type: <string> | default = ""] [kmskeyid: <string> | default = ""] [kmsencryptioncontext: <string> | default = ""] backoff_config: [min_period: <duration> | default = 100ms] [max_period: <duration> | default = 3s] [max_retries: <int> | default = 5] ``` The `azurestorageconfig` block configures the connection to Azure object storage backend. The supported CLI flags `<prefix>` used to reference this configuration block are: `common.storage` `ruler.storage` &nbsp; ```yaml [environment: <string> | default = "AzureGlobal"] [account_name: <string> | default = ""] [account_key: <string> | default = ""] [connection_string: <string> | default = ""] [container_name: <string> | default = "loki"] [endpoint_suffix: <string> | default = ""] [usemanagedidentity: <boolean> | default = false] [usefederatedtoken: <boolean> | default = false] [userassignedid: <string> | default = ""] [useserviceprincipal: <boolean> | default = false] [client_id: <string> | default = ""] [client_secret: <string> | default = ""] [tenant_id: <string> | default = ""] [chunk_delimiter: <string> | default = "-"] [downloadbuffersize: <int> | default = 512000] [uploadbuffersize: <int> | default = 256000] [uploadbuffercount: <int> | default = 1] [request_timeout: <duration> | default = 30s] [max_retries: <int> | default = 5] [minretrydelay: <duration> | default = 10ms] [maxretrydelay: <duration> | default = 500ms] ``` 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 ring: kvstore: [store: <string> | default = "consul"] [prefix: <string> | default = "collectors/"] [consul: <consul>] [etcd: <etcd>] multi: [primary: <string> | default = ""] [secondary: <string> | default = ""] [mirror_enabled: <boolean> | default = false] [mirror_timeout: <duration> | default = 2s] [heartbeat_period: <duration> | default = 15s] [heartbeat_timeout: <duration> | default = 1m] [tokensfilepath: <string> | default = ""] [zoneawarenessenabled: <boolean> | default = false] [num_tokens: <int> | default = 10] [instance_id: <string> | default = "<hostname>"] [instanceinterfacenames: <list of strings> | default = [<private network interfaces>]] [instance_port: <int> | default = 0] [instance_addr: <string> | default = ""] [instanceavailabilityzone: <string> | default = ""] [instanceenableipv6: <boolean> | default = false] [enabled: <boolean> | default = false] [compaction_interval: <duration> | default = 10m] [mintableoffset: <int> | default = 1] [maxtableoffset: <int> | default = 2] [worker_parallelism: <int> | default = 1] [compactionretriesmin_backoff: <duration> | default = 10s] [compactionretriesmax_backoff: <duration> | default = 1m] [compaction_retries: <int> | default = 3] [maxcompactionparallelism: <int> | default = 1] retention: [enabled: <boolean> | default = false] [maxlookbackdays: <int> | default = 365] ``` Experimental: The `bloom_gateway` block configures the Loki bloom gateway server, responsible for serving queries for filtering chunks based on filter

```yaml [enabled: <boolean> | default = false] client: pool_config: [check_interval: <duration> | default = 10s] [enablehealthcheck: <boolean> | default = true] [healthchecktimeout: <duration> | default = 1s] [grpcclientconfig: <grpc_client>] results_cache: [cache: <cache_config>] [compression: <string> | default = ""] [cache_results: <boolean> | default = false] [addresses: <string> | default = ""] [worker_concurrency: <int> | default = 4] [blockqueryconcurrency: <int> | default = 8] [maxoutstandingper_tenant: <int> | default = 1024] [nummultiplextasks: <int> | default = 512] ``` The `bosstorageconfig` block configures the connection to Baidu Object Storage (BOS) object storage backend. The supported CLI flags `<prefix>` used to reference this configuration block are: `common.storage` `ruler.storage` &nbsp; ```yaml [bucket_name: <string> | default = ""] [endpoint: <string> | default = "bj.bcebos.com"] [accesskeyid: <string> | default = ""] [secretaccesskey: <string> | default = ""] ``` 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: `bloom-gateway-client.cache` `bloom.metas-cache` `frontend` `frontend.index-stats-results-cache` `frontend.instant-metric-results-cache` `frontend.label-results-cache` `frontend.series-results-cache` `frontend.volume-results-cache` `store.chunks-cache` `store.chunks-cache-l2` `store.index-cache-read` `store.index-cache-write` &nbsp; ```yaml [default_validity: <duration> | default = 1h] background: [writeback_goroutines: <int> | default = 1] [writeback_buffer: <int> | default = 500000] [writebacksizelimit: <int> | default = 500MB] memcached: [expiration: <duration> | default = 0s] [batch_size: <int> | default = 4] [parallelism: <int> | default = 5] memcached_client: [host: <string> | default = ""] [service: <string> | default = "memcached"] [addresses: <string> | default = ""] [timeout: <duration> | default = 100ms] [maxidleconns: <int> | default = 16] [maxitemsize: <int> | default = 0] [update_interval: <duration> | default = 1m] [consistent_hash: <boolean> | default = true] [circuitbreakerconsecutive_failures: <int> | default = 10] [circuitbreakertimeout: <duration> | default = 10s] [circuitbreakerinterval: <duration> | default = 10s] [tls_enabled: <boolean> | default = false] [tlscertpath: <string> | default = ""] [tlskeypath: <string> | default = ""] [tlscapath: <string> | default = ""] [tlsservername: <string> | default = ""] [tlsinsecureskip_verify: <boolean> | default = false] [tlsciphersuites: <string> | default = ""] [tlsminversion: <string> | default = ""] redis: [endpoint: <string> | default = ""] [master_name: <string> | default = ""] [timeout: <duration> | default = 500ms] [expiration: <duration> | default = 0s] [db: <int> | default = 0] [pool_size: <int> | default = 0] [username: <string> | default = ""] [password: <string> | default = ""] [tls_enabled: <boolean> | default = false] [tlsinsecureskip_verify: <boolean> | default = false] [idle_timeout: <duration> | default = 0s] [maxconnectionage: <duration> | default = 0s] [route_randomly: <boolean> | default = false] embedded_cache: [enabled: <boolean> | default = false] [maxsizemb: <int> | default = 100] [maxsizeitems: <int> | default = 0] [ttl: <duration> | default = 1h] ``` The `chunkstoreconfig` block configures how chunks will be cached and how long to wait before saving them to the backing store. ```yaml [chunkcacheconfig: <cache_config>] [chunkcacheconfigl2: <cacheconfig>] [writededupecacheconfig: <cacheconfig>] [l2chunkcache_handoff: <duration> | default = 0s] [cachelookupsolder_than: <duration> | default = 0s] ``` Common configuration to be shared between multiple modules. If a more specific configuration is given in other sections, the related configuration within this section will be ignored. ```yaml [path_prefix: <string> | default = ""] storage: [s3: <s3storageconfig>] [gcs: <gcsstorageconfig>] [azure: <azurestorageconfig>] [alibabacloud: <alibabacloudstorageconfig>] [bos: <bosstorageconfig>] [swift: <swiftstorageconfig>] filesystem: [chunks_directory: <string> | default = ""] [rules_directory: <string> | default = ""] hedging: [at: <duration> | default = 0s] [up_to: <int> | default = 2] [maxpersecond: <int> | default = 5] [cos: <cosstorageconfig>] congestion_control: [enabled: <boolean> | default = false] controller: [strategy: <string> | default = ""] aimd: [start: <int> | default = 2000] [upper_bound: <int> | default = 10000] [backoff_factor: <float> | default =

retry: [strategy: <string> | default = ""] [limit: <int> | default = 2] hedging: config: [at: <duration>] [up_to: <int>] [maxpersecond: <int>] [strategy: <string> | default = ""] [persist_tokens: <boolean>] [replication_factor: <int>] ring: kvstore: [store: <string> | default = "consul"] [prefix: <string> | default = "collectors/"] [consul: <consul>] [etcd: <etcd>] multi: [primary: <string> | default = ""] [secondary: <string> | default = ""] [mirror_enabled: <boolean> | default = false] [mirror_timeout: <duration> | default = 2s] [heartbeat_period: <duration> | default = 15s] [heartbeat_timeout: <duration> | default = 1m] [tokensfilepath: <string> | default = ""] [zoneawarenessenabled: <boolean> | default = false] [num_tokens: <int> | default = 128] [replication_factor: <int> | default = 3] [instance_id: <string> | default = "<hostname>"] [instanceinterfacenames: <list of strings> | default = [<private network interfaces>]] [instance_port: <int> | default = 0] [instance_addr: <string> | default = ""] [instanceavailabilityzone: <string> | default = ""] [instanceenableipv6: <boolean> | default = false] [instanceinterfacenames: <list of strings> | default = [<private network interfaces>]] [instance_addr: <string> | default = ""] [compactor_address: <string> | default = ""] [compactorgrpcaddress: <string> | default = ""] ``` The `compactor` block configures the compactor component, which compacts index shards for performance. ```yaml [working_directory: <string> | default = ""] [compaction_interval: <duration> | default = 10m] [applyretentioninterval: <duration> | default = 0s] [retention_enabled: <boolean> | default = false] [retentiondeletedelay: <duration> | default = 2h] [retentiondeleteworker_count: <int> | default = 150] [retentiontabletimeout: <duration> | default = 0s] [deleterequeststore: <string> | default = ""] [deleterequeststorekeyprefix: <string> | default = "index/"] [deletebatchsize: <int> | default = 70] [deleterequestcancel_period: <duration> | default = 24h] [deletemaxinterval: <duration> | default = 24h] [maxcompactionparallelism: <int> | default = 1] [upload_parallelism: <int> | default = 10] compactor_ring: kvstore: [store: <string> | default = "consul"] [prefix: <string> | default = "collectors/"] [consul: <consul>] [etcd: <etcd>] multi: [primary: <string> | default = ""] [secondary: <string> | default = ""] [mirror_enabled: <boolean> | default = false] [mirror_timeout: <duration> | default = 2s] [heartbeat_period: <duration> | default = 15s] [heartbeat_timeout: <duration> | default = 1m] [tokensfilepath: <string> | default = ""] [zoneawarenessenabled: <boolean> | default = false] [instance_id: <string> | default = "<hostname>"] [instanceinterfacenames: <list of strings> | default = [<private network interfaces>]] [instance_port: <int> | default = 0] [instance_addr: <string> | default = ""] [instanceavailabilityzone: <string> | default = ""] [instanceenableipv6: <boolean> | default = false] [tablestocompact: <int> | default = 0] [skiplatestn_tables: <int> | default = 0] ``` Configuration for a Consul client. Only applies if the selected kvstore is `consul`. The supported CLI flags `<prefix>` used to reference this configuration block are: `bloom-compactor.ring` `common.storage.ring` `compactor.ring` `distributor.ring` `index-gateway.ring` `pattern-ingester` `query-scheduler.ring` `ruler.ring` &nbsp; ```yaml [host: <string> | default = "localhost:8500"] [acl_token: <string> | default = ""] [httpclienttimeout: <duration> | default = 20s] [consistent_reads: <boolean> | default = false] [watchratelimit: <float> | default = 1] [watchburstsize: <int> | default = 1] [casretrydelay: <duration> | default = 1s] ``` The `cosstorageconfig` block configures the connection to IBM Cloud Object Storage (COS) backend. The supported CLI flags `<prefix>` used to reference this configuration block are: `common.storage` `ruler.storage` &nbsp; ```yaml [forcepathstyle: <boolean> | default = false] [bucketnames: <string> | default = ""] [endpoint: <string> | default = ""] [region: <string> | default = ""] [accesskeyid: <string> | default = ""] [secretaccesskey: <string> | default = ""] http_config: [idleconntimeout: <duration> | default = 1m30s] [responseheadertimeout: <duration> | default = 0s] backoff_config: [min_period: <duration> | default = 100ms] [max_period: <duration> | default = 3s] [max_retries: <int> | default = 5] [api_key: <string> | default = ""] [serviceinstanceid: <string> | default = ""] [auth_endpoint: <string> | default =

[crtokenfile_path: <string> | default = ""] [trustedprofilename: <string> | default = ""] [trustedprofileid: <string> | default = ""] ``` Configures the `distributor`. ```yaml ring: kvstore: [store: <string> | default = "consul"] [prefix: <string> | default = "collectors/"] [consul: <consul>] [etcd: <etcd>] multi: [primary: <string> | default = ""] [secondary: <string> | default = ""] [mirror_enabled: <boolean> | default = false] [mirror_timeout: <duration> | default = 2s] [heartbeat_period: <duration> | default = 5s] [heartbeat_timeout: <duration> | default = 1m] [instanceinterfacenames: <list of strings> | default = [<private network interfaces>]] rate_store: [maxrequestparallelism: <int> | default = 200] [streamrateupdate_interval: <duration> | default = 1s] [ingesterrequesttimeout: <duration> | default = 500ms] [debug: <boolean> | default = false] writefailureslogging: [rate: <int> | default = 1KB] [addinsightslabel: <boolean> | default = false] otlp_config: [defaultresourceattributesasindexlabels: <list of strings> | default = [service.name service.namespace service.instance.id deployment.environment cloud.region cloud.availabilityzone k8s.cluster.name k8s.namespace.name k8s.pod.name k8s.container.name container.name k8s.replicaset.name k8s.deployment.name k8s.statefulset.name k8s.daemonset.name k8s.cronjob.name k8s.job.name]] ``` Configuration for an ETCD v3 client. Only applies if the selected kvstore is `etcd`. The supported CLI flags `<prefix>` used to reference this configuration block are: `bloom-compactor.ring` `common.storage.ring` `compactor.ring` `distributor.ring` `index-gateway.ring` `pattern-ingester` `query-scheduler.ring` `ruler.ring` &nbsp; ```yaml [endpoints: <list of strings> | default = []] [dial_timeout: <duration> | default = 10s] [max_retries: <int> | default = 10] [tls_enabled: <boolean> | default = false] [tlscertpath: <string> | default = ""] [tlskeypath: <string> | default = ""] [tlscapath: <string> | default = ""] [tlsservername: <string> | default = ""] [tlsinsecureskip_verify: <boolean> | default = false] [tlsciphersuites: <string> | default = ""] [tlsminversion: <string> | default = ""] [username: <string> | default = ""] [password: <string> | default = ""] ``` The `frontend` block configures the Loki query-frontend. ```yaml [logquerieslonger_than: <duration> | default = 0s] [logqueryrequest_headers: <string> | default = ""] [maxbodysize: <int> | default = 10485760] [querystatsenabled: <boolean> | default = false] [maxoutstandingper_tenant: <int> | default = 2048] [querierforgetdelay: <duration> | default = 0s] [scheduler_address: <string> | default = ""] [schedulerdnslookup_period: <duration> | default = 10s] [schedulerworkerconcurrency: <int> | default = 5] [grpcclientconfig: <grpc_client>] [gracefulshutdowntimeout: <duration> | default = 5m] [instanceinterfacenames: <list of strings> | default = [<private network interfaces>]] [encoding: <string> | default = "json"] [compress_responses: <boolean> | default = true] [downstream_url: <string> | default = ""] [tailproxyurl: <string> | default = ""] [tailtlsconfig: <tls_config>] ``` The `frontend_worker` configures the worker - running within the Loki querier - picking up and executing queries enqueued by the query-frontend. ```yaml [frontend_address: <string> | default = ""] [scheduler_address: <string> | default = ""] [dnslookupduration: <duration> | default = 3s] [id: <string> | default = ""] [queryfrontendgrpcclient: <grpcclient>] [grpcclientconfig: <grpc_client>] [queryschedulergrpcclient: <grpcclient>] ``` The `gcsstorageconfig` block configures the connection to Google Cloud Storage object storage backend. The supported CLI flags `<prefix>` used to reference this configuration block are: `common.storage` `ruler.storage` &nbsp; ```yaml [bucket_name: <string> | default = ""] [service_account: <string> | default = ""] [chunkbuffersize: <int> | default = 0] [request_timeout: <duration> | default = 0s] [enable_opencensus: <boolean> | default = true] [enable_http2: <boolean> | default = true] [enable_retries: <boolean> | default = true] ``` 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` `boltdb.shipper.index-gateway-client.grpc` `frontend.grpc-client-config` `ingester.client` `pattern-ingester.client` `querier.frontend-client` `querier.frontend-grpc-client` `querier.scheduler-grpc-client` `query-scheduler.grpc-client-config` `ruler.client`

&nbsp; ```yaml [maxrecvmsg_size: <int> | default = 104857600] [maxsendmsg_size: <int> | default = 104857600] [grpc_compression: <string> | default = ""] [rate_limit: <float> | default = 0] [ratelimitburst: <int> | default = 0] [backoffonratelimits: <boolean> | default = false] backoff_config: [min_period: <duration> | default = 100ms] [max_period: <duration> | default = 10s] [max_retries: <int> | default = 10] [initialstreamwindow_size: <int> | default = 63KiB1023B] [initialconnectionwindow_size: <int> | default = 63KiB1023B] [tls_enabled: <boolean> | default = false] [tlscertpath: <string> | default = ""] [tlskeypath: <string> | default = ""] [tlscapath: <string> | default = ""] [tlsservername: <string> | default = ""] [tlsinsecureskip_verify: <boolean> | default = false] [tlsciphersuites: <string> | default = ""] [tlsminversion: <string> | default = ""] [connect_timeout: <duration> | default = 5s] [connectbackoffbase_delay: <duration> | default = 1s] [connectbackoffmax_delay: <duration> | default = 5s] ``` 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. ```yaml [mode: <string> | default = "simple"] ring: kvstore: [store: <string> | default = "consul"] [prefix: <string> | default = "collectors/"] [consul: <consul>] [etcd: <etcd>] multi: [primary: <string> | default = ""] [secondary: <string> | default = ""] [mirror_enabled: <boolean> | default = false] [mirror_timeout: <duration> | default = 2s] [heartbeat_period: <duration> | default = 15s] [heartbeat_timeout: <duration> | default = 1m] [tokensfilepath: <string> | default = ""] [zoneawarenessenabled: <boolean> | default = false] [replication_factor: <int> | default = 3] [instance_id: <string> | default = "<hostname>"] [instanceinterfacenames: <list of strings> | default = [<private network interfaces>]] [instance_port: <int> | default = 0] [instance_addr: <string> | default = ""] [instanceavailabilityzone: <string> | default = ""] [instanceenableipv6: <boolean> | default = false] ``` The `ingester` block configures the ingester and how the ingester will register itself to a key value store. ```yaml lifecycler: ring: kvstore: [store: <string> | default = "consul"] [prefix: <string> | default = "collectors/"] [consul: <consul>] [etcd: <etcd>] multi: [primary: <string> | default = ""] [secondary: <string> | default = ""] [mirror_enabled: <boolean> | default = false] [mirror_timeout: <duration> | default = 2s] [heartbeat_timeout: <duration> | default = 1m] [replication_factor: <int> | default = 3] [zoneawarenessenabled: <boolean> | default = false] [excluded_zones: <string> | default = ""] [num_tokens: <int> | default = 128] [heartbeat_period: <duration> | default = 5s] [heartbeat_timeout: <duration> | default = 1m] [observe_period: <duration> | default = 0s] [join_after: <duration> | default = 0s] [minreadyduration: <duration> | default = 15s] [interface_names: <list of strings> | default = [<private network interfaces>]] [enable_inet6: <boolean> | default = false] [final_sleep: <duration> | default = 0s] [tokensfilepath: <string> | default = ""] [availability_zone: <string> | default = ""] [unregisteronshutdown: <boolean> | default = true] [readinesscheckring_health: <boolean> | default = true] [address: <string> | default = ""] [port: <int> | default = 0] [id: <string> | default = "<hostname>"] [concurrent_flushes: <int> | default = 32] [flushcheckperiod: <duration> | default = 30s] [flushoptimeout: <duration> | default = 10m] [chunkretainperiod: <duration> | default = 0s] [chunkidleperiod: <duration> | default = 30m] [chunkblocksize: <int> | default = 262144] [chunktargetsize: <int> | default = 1572864] [chunk_encoding: <string> | default = "gzip"] [maxchunkage: <duration> | default = 2h] [autoforget_unhealthy: <boolean> | default = false] [sync_period: <duration> | default = 1h] [syncminutilization: <float> | default = 0.1] [maxreturnedstream_errors: <int> | default = 10] [querystoremaxlookback_period: <duration> | default = 0s] wal: [enabled: <boolean> | default = true] [dir: <string> | default = "wal"] [checkpoint_duration: <duration> | default = 5m] [flushonshutdown: <boolean> | default = false] [replaymemoryceiling: <int> | default = 4GB] [index_shards: <int> | default = 32] [maxdroppedstreams: <int> | default = 10] [shutdownmarkerpath: <string> | default = ""] ``` The `ingester_client` block configures how the distributor will connect to ingesters. Only appropriate when running all components, the distributor, or the

```yaml pool_config: [clientcleanupperiod: <duration> | default = 15s] [healthcheckingesters: <boolean> | default = true] [remote_timeout: <duration> | default = 1s] [remote_timeout: <duration> | default = 5s] [grpcclientconfig: <grpc_client>] ``` The `limitsconfig` block configures global and per-tenant limits in Loki. The values here can be overridden in the `overrides` section of the runtimeconfig file ```yaml [ingestionratestrategy: <string> | default = "global"] [ingestionratemb: <float> | default = 4] [ingestionburstsize_mb: <float> | default = 6] [maxlabelname_length: <int> | default = 1024] [maxlabelvalue_length: <int> | default = 2048] [maxlabelnamesperseries: <int> | default = 15] [rejectoldsamples: <boolean> | default = true] [rejectoldsamplesmaxage: <duration> | default = 1w] [creationgraceperiod: <duration> | default = 10m] [maxlinesize: <int> | default = 256KB] [maxlinesize_truncate: <boolean> | default = false] [incrementduplicatetimestamp: <boolean> | default = false] [discoverservicename: <list of strings> | default = [service app application name appkubernetesioname container containername component workload job]] [discoverloglevels: <boolean> | default = true] [maxstreamsper_user: <int> | default = 0] [maxglobalstreamsperuser: <int> | default = 5000] [unordered_writes: <boolean> | default = true] [perstreamrate_limit: <int> | default = 3MB] [perstreamratelimitburst: <int> | default = 15MB] [maxchunksper_query: <int> | default = 2000000] [maxqueryseries: <int> | default = 500] [maxquerylookback: <duration> | default = 0s] [maxquerylength: <duration> | default = 30d1h] [maxqueryrange: <duration> | default = 0s] [maxqueryparallelism: <int> | default = 32] [tsdbmaxquery_parallelism: <int> | default = 128] [tsdbmaxbytespershard: <int> | default = 600MB] [tsdbshardingstrategy: <string> | default = "poweroftwo"] [tsdbprecomputechunks: <boolean> | default = false] [cardinality_limit: <int> | default = 100000] [maxstreamsmatchersperquery: <int> | default = 1000] [maxconcurrenttail_requests: <int> | default = 10] [maxentrieslimitperquery: <int> | default = 5000] [maxcachefreshnessperquery: <duration> | default = 10m] [maxmetadatacache_freshness: <duration> | default = 1d] [maxstatscache_freshness: <duration> | default = 10m] [maxqueriersper_tenant: <int> | default = 0] [maxquerycapacity: <float> | default = 0] [queryreadyindexnumdays: <int> | default = 0] [query_timeout: <duration> | default = 1m] [splitqueriesby_interval: <duration> | default = 1h] [splitmetadataqueriesbyinterval: <duration> | default = 1d] [splitrecentmetadataqueriesby_interval: <duration> | default = 1h] [recentmetadataquery_window: <duration> | default = 0s] [splitinstantmetricqueriesby_interval: <duration> | default = 1h] [splitingesterqueriesbyinterval: <duration> | default = 0s] [minshardinglookback: <duration> | default = 0s] [maxquerybytes_read: <int> | default = 0B] [maxquerierbytes_read: <int> | default = 150GB] [volume_enabled: <boolean> | default = true] [volumemaxseries: <int> | default = 1000] [rulermaxrulesperrule_group: <int> | default = 0] [rulermaxrulegroupsper_tenant: <int> | default = 0] [rulertenantshard_size: <int> | default = 0] [rulerremotewrite_disabled: <boolean>] [rulerremotewrite_url: <string> | default = ""] [rulerremotewrite_timeout: <duration>] [rulerremotewrite_headers: <headers>] [rulerremotewriterelabelconfigs: <relabel_config...>] [rulerremotewritequeuecapacity: <int>] [rulerremotewritequeuemin_shards: <int>] [rulerremotewritequeuemax_shards: <int>] [rulerremotewritequeuemaxsamplesper_send: <int>] [rulerremotewritequeuebatchsenddeadline: <duration>] [rulerremotewritequeuemin_backoff: <duration>] [rulerremotewritequeuemax_backoff: <duration>] [rulerremotewritequeueretryonratelimit: <boolean>] rulerremotewritesigv4config: [region: <string> | default = ""] [access_key: <string> | default = ""] [secret_key: <string> | default = ""] [profile: <string> | default = ""] [role_arn: <string> | default = ""] [rulerremotewrite_config: <map of string to RemoteWriteConfig>] [rulerremoteevaluation_timeout: <duration>] [rulerremoteevaluationmaxresponse_size: <int>] [deletion_mode: <string> | default = "filter-and-delete"] [retention_period: <duration> | default = 0s] [retention_stream: <list of StreamRetentions>] [pertenantoverride_config: <string> | default = ""] [pertenantoverride_period: <duration> | default = 10s] [allow_deletes: <boolean>] shard_streams: [enabled: <boolean> | default = true] [logging_enabled: <boolean> | default = false] [desired_rate: <int> | default = 1536KB] [blockedqueries: <blockedquery...>] [required_labels: <list of strings>] [minimumlabelsnumber: <int>] [indexgatewayshard_size: <int> | default = 0] [bloomgatewayshard_size: <int> | default = 0] [bloomgatewayenable_filtering: <boolean> | default = false] [bloomgatewaycachekeyinterval: <duration> | default = 15m] [bloomcompactorshard_size: <int> | default = 0] [bloomcompactorenable_compaction: <boolean> | default = false] [bloomcompactormaxblocksize: <int> | default = 200MB] [bloomcompactormaxbloomsize: <int> | default = 128MB] [bloomngramlength: <int> | default = 4] [bloomngramskip: <int> | default = 1] [bloomfalsepositive_rate: <float> | default =

[bloomblockencoding: <string> | default = "none"] [allowstructuredmetadata: <boolean> | default = true] [maxstructuredmetadata_size: <int> | default = 64KB] [maxstructuredmetadataentriescount: <int> | default = 128] otlp_config: resource_attributes: [ignore_defaults: <boolean> | default = false] [attributesconfig: <list of attributesconfigs>] [scopeattributes: <list of attributesconfigs>] [logattributes: <list of attributesconfigs>] ``` The `localstorageconfig` block configures the usage of local file system as object storage backend. ```yaml [directory: <string> | default = ""] ``` Configuration for `memberlist` client. Only applies if the selected kvstore is memberlist. When a memberlist config with atleast 1 join_members is defined, kvstore of type memberlist is automatically selected for all the components that require a ring unless otherwise specified in the component's configuration section. ```yaml [node_name: <string> | default = ""] [randomizenodename: <boolean> | default = true] [stream_timeout: <duration> | default = 10s] [retransmit_factor: <int> | default = 4] [pullpushinterval: <duration> | default = 30s] [gossip_interval: <duration> | default = 200ms] [gossip_nodes: <int> | default = 3] [gossiptodeadnodestime: <duration> | default = 30s] [deadnodereclaim_time: <duration> | default = 0s] [compression_enabled: <boolean> | default = true] [advertise_addr: <string> | default = ""] [advertise_port: <int> | default = 7946] [cluster_label: <string> | default = ""] [clusterlabelverification_disabled: <boolean> | default = false] [join_members: <list of strings> | default = []] [minjoinbackoff: <duration> | default = 1s] [maxjoinbackoff: <duration> | default = 1m] [maxjoinretries: <int> | default = 10] [abortifclusterjoinfails: <boolean> | default = false] [rejoin_interval: <duration> | default = 0s] [leftingesterstimeout: <duration> | default = 5m] [leave_timeout: <duration> | default = 20s] [messagehistorybuffer_bytes: <int> | default = 0] [bind_addr: <list of strings> | default = []] [bind_port: <int> | default = 7946] [packetdialtimeout: <duration> | default = 2s] [packetwritetimeout: <duration> | default = 5s] [tls_enabled: <boolean> | default = false] [tlscertpath: <string> | default = ""] [tlskeypath: <string> | default = ""] [tlscapath: <string> | default = ""] [tlsservername: <string> | default = ""] [tlsinsecureskip_verify: <boolean> | default = false] [tlsciphersuites: <string> | default = ""] [tlsminversion: <string> | default = ""] ``` Configures additional object stores for a given storage provider. Supported stores: aws, azure, bos, filesystem, gcs, swift. Example: storage_config: named_stores: aws: store-1: endpoint: s3://foo-bucket region: us-west1 Named store from this example can be used by setting objectstore to store-1 in periodconfig. ```yaml [aws: <map of string to awsstorageconfig>] [azure: <map of string to azurestorageconfig>] [bos: <map of string to bosstorageconfig>] [filesystem: <map of string to localstorageconfig>] [gcs: <map of string to gcsstorageconfig>] [alibabacloud: <map of string to alibabacloudstorageconfig>] [swift: <map of string to swiftstorageconfig>] [cos: <map of string to cosstorageconfig>] ``` These are values which allow you to control aspects of Loki's operation, most commonly used for controlling types of higher verbosity logging, the values here can be overridden in the `configs` section of the `runtime_config` file. ```yaml [logstreamcreation: <boolean> | default = false] [logpushrequest: <boolean> | default = false] [logpushrequest_streams: <boolean> | default = false] [limitedlogpush_errors: <boolean> | default = true] ``` The `period_config` block configures what index schemas should be used for from specific time periods. ```yaml [from: <daytime>] [store: <string> | default = ""] [object_store: <string> | default = ""] [schema: <string> | default = ""] index: [path_prefix: <string> | default = "index/"] [prefix: <string> | default = ""] [period: <duration>] [tags: <map of string to string>] chunks: [prefix: <string> | default = ""] [period: <duration>] [tags: <map of string to string>] [row_shards: <int> | default = 16] ``` Configures the `querier`. Only appropriate when running all modules or just the

```yaml [tailmaxduration: <duration> | default = 1h] [extraquerydelay: <duration> | default = 0s] [queryingesterswithin: <duration> | default = 3h] engine: [maxlookback_period: <duration> | default = 30s] [max_concurrent: <int> | default = 4] [querystoreonly: <boolean> | default = false] [queryingesteronly: <boolean> | default = false] [multitenantqueries_enabled: <boolean> | default = false] [perrequestlimits_enabled: <boolean> | default = false] ``` The `query_range` block configures the query splitting and caching in the Loki query-frontend. ```yaml [alignquerieswith_step: <boolean> | default = false] results_cache: [cache: <cache_config>] [compression: <string> | default = ""] [cache_results: <boolean> | default = false] [max_retries: <int> | default = 5] [paralleliseshardablequeries: <boolean> | default = true] [shard_aggregations: <string> | default = ""] [cacheindexstats_results: <boolean> | default = true] indexstatsresults_cache: [cache: <cache_config>] [compression: <string> | default = ""] [cachevolumeresults: <boolean> | default = true] volumeresultscache: [cache: <cache_config>] [compression: <string> | default = ""] [cacheinstantmetric_results: <boolean> | default = false] instantmetricresults_cache: [cache: <cache_config>] [compression: <string> | default = ""] [instantmetricquerysplitalign: <boolean> | default = false] [cacheseriesresults: <boolean> | default = true] seriesresultscache: [cache: <cache_config>] [compression: <string> | default = ""] [cachelabelresults: <boolean> | default = true] labelresultscache: [cache: <cache_config>] [compression: <string> | default = ""] ``` The `query_scheduler` block configures the Loki query scheduler. When configured it separates the tenant query queues from the query-frontend. ```yaml [maxoutstandingrequestspertenant: <int> | default = 32000] [maxqueuehierarchy_levels: <int> | default = 3] [querierforgetdelay: <duration> | default = 0s] [grpcclientconfig: <grpc_client>] [useschedulerring: <boolean> | default = false] scheduler_ring: kvstore: [store: <string> | default = "consul"] [prefix: <string> | default = "collectors/"] [consul: <consul>] [etcd: <etcd>] multi: [primary: <string> | default = ""] [secondary: <string> | default = ""] [mirror_enabled: <boolean> | default = false] [mirror_timeout: <duration> | default = 2s] [heartbeat_period: <duration> | default = 15s] [heartbeat_timeout: <duration> | default = 1m] [tokensfilepath: <string> | default = ""] [zoneawarenessenabled: <boolean> | default = false] [instance_id: <string> | default = "<hostname>"] [instanceinterfacenames: <list of strings> | default = [<private network interfaces>]] [instance_port: <int> | default = 0] [instance_addr: <string> | default = ""] [instanceavailabilityzone: <string> | default = ""] [instanceenableipv6: <boolean> | default = false] ``` The `ruler` block configures the Loki ruler. ```yaml [external_url: <url>] [datasource_uid: <string> | default = ""] [external_labels: <list of Labels>] [rulerclient: <grpcclient>] [evaluation_interval: <duration> | default = 1m] [poll_interval: <duration> | default = 1m] storage: [type: <string> | default = ""] [azure: <azurestorageconfig>] [alibabacloud: <alibabacloudstorageconfig>] [gcs: <gcsstorageconfig>] [s3: <s3storageconfig>] [bos: <bosstorageconfig>] [swift: <swiftstorageconfig>] [cos: <cosstorageconfig>] local: [directory: <string> | default = ""] [rule_path: <string> | default = "/rules"] [alertmanager_url: <string> | default = ""] [enablealertmanagerdiscovery: <boolean> | default = false] [alertmanagerrefreshinterval: <duration> | default = 1m] [enablealertmanagerv2: <boolean> | default = false] [alertrelabelconfigs:

[notificationqueuecapacity: <int> | default = 10000] [notification_timeout: <duration> | default = 10s] alertmanager_client: [tlscertpath: <string> | default = ""] [tlskeypath: <string> | default = ""] [tlscapath: <string> | default = ""] [tlsservername: <string> | default = ""] [tlsinsecureskip_verify: <boolean> | default = false] [tlsciphersuites: <string> | default = ""] [tlsminversion: <string> | default = ""] [basicauthusername: <string> | default = ""] [basicauthpassword: <string> | default = ""] [type: <string> | default = "Bearer"] [credentials: <string> | default = ""] [credentials_file: <string> | default = ""] [foroutagetolerance: <duration> | default = 1h] [forgraceperiod: <duration> | default = 10m] [resend_delay: <duration> | default = 1m] [enable_sharding: <boolean> | default = false] [sharding_strategy: <string> | default = "default"] [sharding_algo: <string> | default = "by-group"] [searchpendingfor: <duration> | default = 5m] ring: kvstore: [store: <string> | default = "consul"] [prefix: <string> | default = "rulers/"] [consul: <consul>] [etcd: <etcd>] multi: [primary: <string> | default = ""] [secondary: <string> | default = ""] [mirror_enabled: <boolean> | default = false] [mirror_timeout: <duration> | default = 2s] [heartbeat_period: <duration> | default = 5s] [heartbeat_timeout: <duration> | default = 1m] [instanceinterfacenames: <list of strings> | default = [<private network interfaces>]] [num_tokens: <int> | default = 128] [flush_period: <duration> | default = 1m] [enable_api: <boolean> | default = true] [enabled_tenants: <string> | default = ""] [disabled_tenants: <string> | default = ""] [querystatsenabled: <boolean> | default = false] [disablerulegroup_label: <boolean> | default = false] wal: [dir: <string> | default = "ruler-wal"] [truncate_frequency: <duration> | default = 1h] [min_age: <duration> | default = 5m] [max_age: <duration> | default = 4h] wal_cleaner: [min_age: <duration> | default = 12h] [period: <duration> | default = 0s] remote_write: [client: <RemoteWriteConfig>] [clients: <map of string to RemoteWriteConfig>] [enabled: <boolean> | default = false] [configrefreshperiod: <duration> | default = 10s] [addorgid_header: <boolean> | default = true] evaluation: [mode: <string> | default = "local"] [max_jitter: <duration> | default = 0s] query_frontend: [address: <string> | default = ""] [tls_enabled: <boolean> | default = false] [tlscertpath: <string> | default = ""] [tlskeypath: <string> | default = ""] [tlscapath: <string> | default = ""] [tlsservername: <string> | default = ""] [tlsinsecureskip_verify: <boolean> | default = false] [tlsciphersuites: <string> | default = ""] [tlsminversion: <string> | default = ""] ``` Configuration for 'runtime config' module, responsible for reloading runtime configuration file. ```yaml [period: <duration> | default = 10s] [file: <string> | default = ""] ``` The `s3storageconfig` block configures the connection to Amazon S3 object storage backend. The supported CLI flags `<prefix>` used to reference this configuration block are: `common` `ruler` &nbsp; ```yaml [s3: <url>] [s3forcepathstyle: <boolean> | default = false] [bucketnames: <string> | default = ""] [endpoint: <string> | default = ""] [region: <string> | default = ""] [accesskeyid: <string> | default = ""] [secretaccesskey: <string> | default = ""] [session_token: <string> | default = ""] [insecure: <boolean> | default = false] http_config: [timeout: <duration> | default = 0s] [idleconntimeout: <duration> | default = 1m30s] [responseheadertimeout: <duration> | default = 0s] [insecureskipverify: <boolean> | default = false] [ca_file: <string> | default = ""] [signature_version: <string> | default = "v4"] [storage_class: <string> | default = "STANDARD"] sse: [type: <string> | default = ""] [kmskeyid: <string> | default = ""] [kmsencryptioncontext: <string> | default = ""] backoff_config: [min_period: <duration> | default = 100ms] [max_period: <duration> | default = 3s] [max_retries: <int> | default = 5] ``` Configures the chunk index schema and where it is stored. ```yaml [configs: <list of period_configs>] ``` Configures the `server` of the launched

```yaml [httplistennetwork: <string> | default = "tcp"] [httplistenaddress: <string> | default = ""] [httplistenport: <int> | default = 3100] [httplistenconn_limit: <int> | default = 0] [grpclistennetwork: <string> | default = "tcp"] [grpclistenaddress: <string> | default = ""] [grpclistenport: <int> | default = 9095] [grpclistenconn_limit: <int> | default = 0] [tlsciphersuites: <string> | default = ""] [tlsminversion: <string> | default = ""] httptlsconfig: [cert: <string> | default = ""] [key: <string> | default = ""] [client_ca: <string> | default = ""] [cert_file: <string> | default = ""] [key_file: <string> | default = ""] [clientauthtype: <string> | default = ""] [clientcafile: <string> | default = ""] grpctlsconfig: [cert: <string> | default = ""] [key: <string> | default = ""] [client_ca: <string> | default = ""] [cert_file: <string> | default = ""] [key_file: <string> | default = ""] [clientauthtype: <string> | default = ""] [clientcafile: <string> | default = ""] [register_instrumentation: <boolean> | default = true] [reportgrpccodesininstrumentationlabelenabled: <boolean> | default = false] [gracefulshutdowntimeout: <duration> | default = 30s] [httpserverread_timeout: <duration> | default = 30s] [httpserverreadheadertimeout: <duration> | default = 0s] [httpserverwrite_timeout: <duration> | default = 30s] [httpserveridle_timeout: <duration> | default = 2m] [httplogclosedconnectionswithoutresponseenabled: <boolean> | default = false] [grpcservermaxrecvmsg_size: <int> | default = 4194304] [grpcservermaxsendmsg_size: <int> | default = 4194304] [grpcservermaxconcurrentstreams: <int> | default = 100] [grpcservermaxconnectionidle: <duration> | default = 2562047h47m16.854775807s] [grpcservermaxconnectionage: <duration> | default = 2562047h47m16.854775807s] [grpcservermaxconnectionage_grace: <duration> | default = 2562047h47m16.854775807s] [grpcserverkeepalive_time: <duration> | default = 2h] [grpcserverkeepalive_timeout: <duration> | default = 20s] [grpcservermintimebetween_pings: <duration> | default = 10s] [grpcserverpingwithoutstream_allowed: <boolean> | default = true] [grpcservernum_workers: <int> | default = 0] [log_format: <string> | default = "logfmt"] [log_level: <string> | default = "info"] [logsourceips_enabled: <boolean> | default = false] [logsourceips_header: <string> | default = ""] [logsourceips_regex: <string> | default = ""] [logrequestheaders: <boolean> | default = false] [logrequestatinfolevel_enabled: <boolean> | default = false] [logrequestexcludeheaderslist: <string> | default = ""] [httppathprefix: <string> | default = ""] ``` The `storageconfig` block configures one of many possible stores for both the index and chunks. Which configuration to be picked should be defined in schemaconfig block. ```yaml [alibabacloud: <alibabacloudstorageconfig>] [aws: <awsstorageconfig>] [azure: <azurestorageconfig>] [bos: <bosstorageconfig>] bigtable: [project: <string> | default = ""] [instance: <string> | default = ""] [grpcclientconfig: <grpc_client>] [tablecacheenabled: <boolean> | default = true] [tablecacheexpiration: <duration> | default = 30m] [gcs: <gcsstorageconfig>] cassandra: [addresses: <string> | default = ""] [port: <int> | default = 9042] [keyspace: <string> | default = ""] [consistency: <string> | default = "QUORUM"] [replication_factor: <int> | default = 3] [disableinitialhost_lookup: <boolean> | default = false] [SSL: <boolean> | default = false] [host_verification: <boolean> | default = true] [hostselectionpolicy: <string> | default = "round-robin"] [CA_path: <string> | default = ""] [tlscertpath: <string> | default = ""] [tlskeypath: <string> | default = ""] [auth: <boolean> | default = false] [username: <string> | default = ""] [password: <string> | default = ""] [password_file: <string> | default = ""] [custom_authenticators: <list of strings> | default = []] [timeout: <duration> | default = 2s] [connect_timeout: <duration> | default = 5s] [reconnect_interval: <duration> | default = 1s] [max_retries: <int> | default = 0] [retrymaxbackoff: <duration> | default = 10s] [retryminbackoff: <duration> | default = 100ms] [query_concurrency: <int> | default = 0] [num_connections: <int> | default = 2] [convicthostson_failure: <boolean> | default = true] [table_options: <string> | default = ""] boltdb: [directory: <string> | default = ""] [filesystem: <localstorageconfig>] [swift: <swiftstorageconfig>] grpc_store: [server_address: <string> | default = ""] hedging: [at: <duration> | default = 0s] [up_to: <int> | default = 2] [maxpersecond: <int> | default = 5] [namedstores: <namedstores_config>] [cos: <cosstorageconfig>] [indexcachevalidity: <duration> | default = 5m] congestion_control: [enabled: <boolean> | default = false] controller: [strategy: <string> | default = ""] aimd: [start: <int> | default = 2000] [upper_bound: <int> | default = 10000] [backoff_factor: <float> | default =

retry: [strategy: <string> | default = ""] [limit: <int> | default = 2] hedging: config: [at: <duration>] [up_to: <int>] [maxpersecond: <int>] [strategy: <string> | default = ""] [object_prefix: <string> | default = ""] [indexqueriescacheconfig: <cacheconfig>] [disablebroadindex_queries: <boolean> | default = false] [maxparallelget_chunk: <int> | default = 150] [maxchunkbatch_size: <int> | default = 50] boltdb_shipper: [activeindexdirectory: <string> | default = ""] [cache_location: <string> | default = ""] [cache_ttl: <duration> | default = 24h] [resync_interval: <duration> | default = 5m] [queryreadynum_days: <int> | default = 0] indexgatewayclient: [grpcclientconfig: <grpc_client>] [server_address: <string> | default = ""] [loggatewayrequests: <boolean> | default = false] [ingestername: <string> | default = ""] [mode: <string> | default = ""] [ingesterdbretainperiod: <duration>] [buildpertenant_index: <boolean> | default = false] tsdb_shipper: [activeindexdirectory: <string> | default = ""] [cache_location: <string> | default = ""] [cache_ttl: <duration> | default = 24h] [resync_interval: <duration> | default = 5m] [queryreadynum_days: <int> | default = 0] indexgatewayclient: [grpcclientconfig: <grpc_client>] [server_address: <string> | default = ""] [loggatewayrequests: <boolean> | default = false] [ingestername: <string> | default = ""] [mode: <string> | default = ""] [ingesterdbretainperiod: <duration>] bloom_shipper: [working_directory: <string> | default = "/data/blooms"] [maxquerypage_size: <int> | default = 64MiB] [download_parallelism: <int> | default = 8] blocks_cache: [soft_limit: <int> | default = 32GiB] [hard_limit: <int> | default = 64GiB] [ttl: <duration> | default = 24h] [metascache: <cacheconfig>] metaslrucache: [enabled: <boolean> | default = false] [maxsizemb: <int> | default = 100] [maxsizeitems: <int> | default = 0] [ttl: <duration> | default = 1h] ``` The `swiftstorageconfig` block configures the connection to OpenStack Object Storage (Swift) object storage backend. The supported CLI flags `<prefix>` used to reference this configuration block are: `common.storage` `ruler.storage` &nbsp; ```yaml [auth_version: <int> | default = 0] [auth_url: <string> | default = ""] [internal: <boolean> | default = false] [username: <string> | default = ""] [userdomainname: <string> | default = ""] [userdomainid: <string> | default = ""] [user_id: <string> | default = ""] [password: <string> | default = ""] [domain_id: <string> | default = ""] [domain_name: <string> | default = ""] [project_id: <string> | default = ""] [project_name: <string> | default = ""] [projectdomainid: <string> | default = ""] [projectdomainname: <string> | default = ""] [region_name: <string> | default = ""] [container_name: <string> | default = ""] [max_retries: <int> | default = 3] [connect_timeout: <duration> | default = 10s] [request_timeout: <duration> | default = 5s] ``` The `table_manager` block configures the table manager for

```yaml [throughputupdatesdisabled: <boolean> | default = false] [retentiondeletesenabled: <boolean> | default = false] [retention_period: <duration> | default = 0s] [poll_interval: <duration> | default = 2m] [creationgraceperiod: <duration> | default = 10m] indextablesprovisioning: [enableondemandthroughput_mode: <boolean> | default = false] [provisionedwritethroughput: <int> | default = 1000] [provisionedreadthroughput: <int> | default = 300] write_scale: [enabled: <boolean> | default = false] [role_arn: <string> | default = ""] [min_capacity: <int> | default = 3000] [max_capacity: <int> | default = 6000] [out_cooldown: <int> | default = 1800] [in_cooldown: <int> | default = 1800] [target: <float> | default = 80] read_scale: [enabled: <boolean> | default = false] [role_arn: <string> | default = ""] [min_capacity: <int> | default = 3000] [max_capacity: <int> | default = 6000] [out_cooldown: <int> | default = 1800] [in_cooldown: <int> | default = 1800] [target: <float> | default = 80] [enableinactivethroughputondemand_mode: <boolean> | default = false] [inactivewritethroughput: <int> | default = 1] [inactivereadthroughput: <int> | default = 300] inactivewritescale: [enabled: <boolean> | default = false] [role_arn: <string> | default = ""] [min_capacity: <int> | default = 3000] [max_capacity: <int> | default = 6000] [out_cooldown: <int> | default = 1800] [in_cooldown: <int> | default = 1800] [target: <float> | default = 80] inactivereadscale: [enabled: <boolean> | default = false] [role_arn: <string> | default = ""] [min_capacity: <int> | default = 3000] [max_capacity: <int> | default = 6000] [out_cooldown: <int> | default = 1800] [in_cooldown: <int> | default = 1800] [target: <float> | default = 80] [inactivewritescale_lastn: <int> | default = 4] [inactivereadscale_lastn: <int> | default = 4] chunktablesprovisioning: [enableondemandthroughput_mode: <boolean> | default = false] [provisionedwritethroughput: <int> | default = 1000] [provisionedreadthroughput: <int> | default = 300] write_scale: [enabled: <boolean> | default = false] [role_arn: <string> | default = ""] [min_capacity: <int> | default = 3000] [max_capacity: <int> | default = 6000] [out_cooldown: <int> | default = 1800] [in_cooldown: <int> | default = 1800] [target: <float> | default = 80] read_scale: [enabled: <boolean> | default = false] [role_arn: <string> | default = ""] [min_capacity: <int> | default = 3000] [max_capacity: <int> | default = 6000] [out_cooldown: <int> | default = 1800] [in_cooldown: <int> | default = 1800] [target: <float> | default = 80] [enableinactivethroughputondemand_mode: <boolean> | default = false] [inactivewritethroughput: <int> | default = 1] [inactivereadthroughput: <int> | default = 300] inactivewritescale: [enabled: <boolean> | default = false] [role_arn: <string> | default = ""] [min_capacity: <int> | default = 3000] [max_capacity: <int> | default = 6000] [out_cooldown: <int> | default = 1800] [in_cooldown: <int> | default = 1800] [target: <float> | default = 80] inactivereadscale: [enabled: <boolean> | default = false] [role_arn: <string> | default = ""] [min_capacity: <int> | default = 3000] [max_capacity: <int> | default = 6000] [out_cooldown: <int> | default = 1800] [in_cooldown: <int> | default = 1800] [target: <float> | default = 80] [inactivewritescale_lastn: <int> | default = 4] [inactivereadscale_lastn: <int> | default = 4] ``` The TLS configuration. ```yaml [tlscertpath: <string> | default = ""] [tlskeypath: <string> | default = ""] [tlscapath: <string> | default = ""] [tlsservername: <string> | default = ""] [tlsinsecureskip_verify: <boolean> | default = false] [tlsciphersuites: <string> | default = ""] [tlsminversion: <string> | default = ""] ``` Configuration for `tracing`. ```yaml [enabled: <boolean> | default = true] ``` Loki has a concept of "runtime config" file, which is simply a file that is reloaded while Loki is running. It is used by some Loki components to allow operator to change some aspects of Loki configuration without restarting it. File is specified by using `-runtime-config.file=<filename>` flag and reload period (which defaults to 10 seconds) can be changed by `-runtime-config.reload-period=<duration>` flag. Previously this mechanism was only used by