How do Loki retention and deletion work?
AdvancedConceptLogging: ELK/EFK, Loki & Log Shippers
Answer
Retention is enforced by the compactor:
compactor:
retention_enabled: true
delete_request_store: s3
limits_config:
retention_period: 744h
retention_stream:
- selector: '{namespace="dev"}'
priority: 1
period: 72h
Per-tenant and per-stream retention is supported. Log-line deletion (for GDPR) uses delete requests via the API, processed by the compactor. Object storage lifecycle rules alone are unsafe because they delete chunks the index still references.
More on Logging: ELK/EFK, Loki & Log Shippers
What is the ELK stack, and what is EFK?BeginnerHow does Elasticsearch store and search logs?IntermediateWhat is ILM (Index Lifecycle Management) and why do log clusters need it?IntermediateWhat is an Elasticsearch data stream?AdvancedWhat is an index template and mapping, and what is a mapping explosion?AdvancedWhat does Logstash do compared with Beats?Intermediate