Commit 8cc4407a authored by Kristian Klausen's avatar Kristian Klausen 🎉
Browse files

loki: Simplify loki.yaml

Loki v2.4.0 introduced a common config section[1][2] making the config
much smaller and better defaults.

So stripped loki.yaml down, removed options where the default is "good
enough" and tweaked retention settings per the upgrade notes[3].

So the config should basically be the example loki.yaml[4] + compactor,
retention enabled and a few tweaks (ex: compress chunks with zstd).

parent 499f6505
# Enables authentication through the X-Scope-OrgID header, which must be present
# if true. If false, the OrgID will always be set to "fake".
auth_enabled: false auth_enabled: false
server: server:
...@@ -8,24 +6,22 @@ server: ...@@ -8,24 +6,22 @@ server:
grpc_listen_address: grpc_listen_address:
grpc_listen_port: 9095 grpc_listen_port: 9095
path_prefix: /var/lib/loki
chunks_directory: /var/lib/loki/chunks
rules_directory: /var/lib/loki/rules
replication_factor: 1
store: inmemory
ingester: ingester:
wal: wal:
enabled: true
dir: /var/lib/loki/wal
replay_memory_ceiling: 200MB replay_memory_ceiling: 200MB
store: inmemory
replication_factor: 1
final_sleep: 0s
chunk_idle_period: 1h # Any chunk not receiving new logs in this time will be flushed
max_chunk_age: 1h # All chunks will be flushed when they hit this age, default is 1h
chunk_target_size: 1536000 # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_age is reached first
chunk_encoding: zstd chunk_encoding: zstd
chunk_retain_period: 30s # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is 5m)
max_transfer_retries: 0 # Chunk transfers disabled
schema_config: schema_config:
configs: configs:
...@@ -37,27 +33,10 @@ schema_config: ...@@ -37,27 +33,10 @@ schema_config:
prefix: index_ prefix: index_
period: 24h period: 24h
active_index_directory: /var/lib/loki/boltdb-shipper-active
cache_location: /var/lib/loki/boltdb-shipper-cache
cache_ttl: 24h # Can be increased for faster performance over longer query periods, uses more disk space
shared_store: filesystem
directory: /var/lib/loki/chunks
compactor: compactor:
working_directory: /var/lib/loki/boltdb-shipper-compactor retention_enabled: true
shared_store: filesystem
limits_config: limits_config:
reject_old_samples: true
reject_old_samples_max_age: 168h
max_query_series: 10000 max_query_series: 10000
retention_period: 91d
chunk_store_config: max_query_lookback: 91d
max_look_back_period: 2184h
retention_deletes_enabled: true
retention_period: 2184h # 91 days
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment