Configuration
1-Local-Configuration-Example.yaml
2-S3-Cluster-Example.yaml
3-S3-Without-Credentials-Snippet.yaml
# If you don't wish to hard-code S3 credentials you can also configure an EC2
# instance role by changing the `storage_config` section.
storage_config:
aws:
s3: s3://region/bucket_name
4-GCS-Example.yaml
5-BOS-Example.yaml
6-Compactor-Snippet.yaml
# This partial configuration sets the compactor to use S3 and run the compaction every 5 minutes.
# Downloaded index files for compaction are stored in /loki/compactor.
compactor:
working_directory: /tmp/loki/compactor
compaction_interval: 5m
7-Schema-Migration-Snippet.yaml
8-alibaba-cloud-storage-Snippet.yaml
9-S3-With-SSE-KMS-Snippet.yaml
# This partial configuration uses S3 for chunk storage and a KMS CMK for encryption.
storage_config:
aws:
s3: s3://access_key:secret_access_key@region/bucket_name
sse:
type: SSE-KMS
kms_key_id: 1234abcd-12ab-34cd-56ef-1234567890ab
10-Expanded-S3-Snippet.yaml
# S3 configuration supports an expanded configuration.
# Either an `s3` endpoint URL can be used, or an expanded configuration can be used.
storage_config:
aws:
bucketnames: bucket_name1, bucket_name2
endpoint: s3.endpoint.com
region: s3_region
access_key_id: s3_access_key_id
secret_access_key: s3_secret_access_key
insecure: false
http_config:
idle_conn_timeout: 90s
response_header_timeout: 0s
insecure_skip_verify: false
s3forcepathstyle: true
11-COS-HMAC-Example.yaml
12-COS-APIKey-Example.yaml
13-COS-Trusted-Profile-Example.yaml
15-Memberlist-Ring-Snippet.yaml
# This partial configuration uses memberlist for the ring.
common:
ring:
kvstore:
store: memberlist
replication_factor: 1
path_prefix: /loki
memberlist:
join_members:
# You can use a headless k8s service for all distributor, ingester and querier components.
- loki-gossip-ring.loki.svc.cluster.local:7946 # :7946 is the default memberlist port.
16-Azure-Account-Name-Example.yaml
# This partial configuration uses Azure for chunk storage
storage_config:
azure:
# For the account-key, see docs: https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal
account_key: <azure_blob_access_key>
account_name: <azure_account_name>
container_name: <azure_storage_bucket_name>
use_managed_identity: false
# Providing a user assigned ID will override use_managed_identity
#user_assigned_id: <user-assigned-identity-id>
request_timeout: 0
# Configure `endpoint_suffix` if you are using private azure cloud like azure stack hub and will use this endpoint suffix to compose container and blob storage URL. Ex: https://account_name.endpoint_suffix/container_name/blob_name
#endpoint_suffix: <endpoint-suffix>
# If `connection_string` is set, the `account_name` and `endpoint_suffix` values will not be used. Use this method over `account_key` if you need to authenticate via an SAS token. Or if you use the Azurite emulator.
#connection_string: <connection-string>
17-Azure-Service-Principal-Example.yaml
# This partial configuration uses Azure for chunk storage and a service principal for authentication
storage_config:
azure:
use_service_principal: true
# Azure tenant ID used to authenticate through Azure OAuth
tenant_id: <tenant-id>
# Azure Service Principal ID
client_id: <client-id>
# Azure Service Principal secret key
client_secret: <client-secret>
# See https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction#containers
container_name: <azure_storage_bucket_name>
request_timeout: 0