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

title: Configuration description: Loki Configuration Examples and Snippets weight: 100 ```yaml auth_enabled: false server: httplistenport: 3100 common: ring: instance_addr: 127.0.0.1 kvstore: store: inmemory replication_factor: 1 path_prefix: /tmp/loki schema_config: configs: from: 2020-05-15 store: tsdb object_store: filesystem schema: v13 index: prefix: index_ period: 24h storage_config: filesystem: directory: /tmp/loki/chunks ``` ```yaml auth_enabled: false server: httplistenport: 3100 common: ring: instance_addr: 127.0.0.1 kvstore: store: inmemory replication_factor: 1 path_prefix: /loki schema_config: configs: from: 2020-05-15 store: tsdb object_store: s3 schema: v13 index: prefix: index_ period: 24h storage_config: tsdb_shipper: activeindexdirectory: /loki/index cachelocation: /loki/indexcache aws: s3: s3://accesskey:secretaccesskey@customendpoint/bucket_name s3forcepathstyle: true ``` ```yaml storage_config: aws: s3: s3://region/bucket_name ``` ```yaml auth_enabled: false server: httplistenport: 3100 common: ring: instance_addr: 127.0.0.1 kvstore: store: inmemory replication_factor: 1 path_prefix: /loki schema_config: configs: from: 2020-05-15 store: tsdb object_store: gcs schema: v13 index: prefix: index_ period: 24h storage_config: tsdb_shipper: activeindexdirectory: /loki/index cachelocation: /loki/indexcache gcs: bucketname: replacebyyourbucked_name ``` ```yaml common: path_prefix: /tmp/loki schema_config: configs: from: 2020-05-15 store: tsdb object_store: bos schema: v13 index: prefix: index_ period: 24h storage_config: bos: bucketname: bucketname_1 endpoint: bj.bcebos.com accesskeyid: accesskeyid secretaccesskey: secretaccesskey ``` ```yaml compactor: working_directory: /tmp/loki/compactor compaction_interval: 5m ``` ```yaml common: path_prefix: /tmp/loki schema_config: configs: from: "2018-04-15" store: boltdb-shipper object_store: filesystem schema: v11 index: period: 24h prefix: index_ from: "2023-06-15" store: tsdb object_store: s3 schema: v13 index: period: 24h prefix: index_ ``` ```yaml common: path_prefix: /tmp/loki schema_config: configs: from: 2020-05-15 store: tsdb object_store: alibabacloud schema: v13 index: prefix: index_ period: 24h storage_config: tsdb_shipper: activeindexdirectory: /loki/index cachelocation: /loki/indexcache alibabacloud: bucket: <bucket> endpoint: <endpoint> accesskeyid: <accesskeyid> secretaccesskey: <secretaccesskey> ``` ```yaml storage_config: aws: s3: s3://accesskey:secretaccesskey@region/bucketname sse: type: SSE-KMS kmskeyid: 1234abcd-12ab-34cd-56ef-1234567890ab ``` ```yaml storage_config: aws: bucketnames: bucketname1, bucketname2 endpoint: s3.endpoint.com region: s3_region accesskeyid: s3accesskey_id secretaccesskey: s3secretaccess_key insecure: false http_config: idleconntimeout: 90s responseheadertimeout: 0s insecureskipverify: false s3forcepathstyle: true ``` ```yaml common: path_prefix: /tmp/loki schema_config: configs: from: 2020-10-01 store: tsdb object_store: cos schema: v13 index: period: 24h prefix: index_ storage_config: cos: bucketnames: <bucket1, bucket2> endpoint: <endpoint> region: <region> accesskeyid: <accesskeyid> secretaccesskey: <secretaccesskey> ``` ```yaml common: path_prefix: /tmp/loki schema_config: configs: from: 2020-10-01 store: tsdb object_store: cos schema: v13 index: period: 24h prefix: index_ storage_config: cos: bucketnames: <bucket1, bucket2> endpoint: <endpoint> region: <region> apikey: <apikeytoauthenticatewithcos> serviceinstanceid: <cosserviceinstance_id> authendpoint: <iamendpointforauthentication> ``` ```yaml common: path_prefix: /tmp/loki schema_config: configs: from: 2020-10-01 store: tsdb object_store: cos schema: v13 index: period: 24h prefix: index_ storage_config: cos: bucketnames: <bucket1, bucket2> endpoint: <endpoint> region: <region> authendpoint: <iamendpointforauthentication> crtokenfilepath: <pathtocomputeresource_token> trustedprofilename: <nameofthetrustedprofile> # You can also use trustedprofileid instead of trustedprofilename ``` ```yaml common: ring: kvstore: store: memberlist replication_factor: 1 path_prefix: /loki memberlist: join_members: loki-gossip-ring.loki.svc.cluster.local:7946 # :7946 is the default memberlist port. ``` ```yaml storage_config: azure: accountkey: <azureblobaccesskey> accountname: <azureaccount_name> containername: <azurestoragebucketname> usemanagedidentity: false request_timeout: 0 ``` ```yaml storage_config: azure: useserviceprincipal: true tenant_id: <tenant-id> client_id: <client-id> client_secret: <client-secret> containername: <azurestoragebucketname> request_timeout: 0 ```