Files
containers/loki/loki/loki-config.yml
T

56 lines
1.2 KiB
YAML

# Loki configuration — single-binary mode, suitable for homelab scale
# Stores data in the local filesystem via the 'loki-data' Docker volume
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
log_level: warn
common:
instance_addr: 127.0.0.1
path_prefix: /loki
storage:
filesystem:
chunks_directory: /loki/chunks
rules_directory: /loki/rules
replication_factor: 1
ring:
kvstore:
store: inmemory
# How long to keep logs. Adjust to taste.
# 90 days is generous but reasonable for a homelab — tune down if disk is tight.
limits_config:
retention_period: 90d
# Reject log lines larger than 256KB (protects against runaway logging)
max_line_size: 256KB
schema_config:
configs:
- from: 2024-01-01
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
compactor:
working_directory: /loki/compactor
# Enables the retention policy above
retention_enabled: true
retention_delete_delay: 2h
delete_request_store: filesystem
query_range:
results_cache:
cache:
embedded_cache:
enabled: true
max_size_mb: 100
ruler:
alertmanager_url: http://localhost:9093