Loki storage and retention

Object storage, index schema, retention and deletion for self-hosted Loki: how data is laid out, how long it is kept and how it is removed.

Loki with Amazon S3 storage

Storing Loki chunks and TSDB indexes in S3: bucket layout for chunks and ruler data, IAM roles instead of static keys, bucket lifecycle rules that must outlast Loki retention, and request cost drivers.

Loki log retention per tenant and per stream

Setting how long Loki keeps logs globally, per tenant and per stream selector through the compactor, how often retention runs, interaction with object store lifecycle policies, and verifying data is actually removed.

Deleting specific log lines from Loki

Removing log entries by stream, time window and line filter through the compactor's delete API, for example after secrets or personal data were logged: deletion modes, the cancellation period and requirements.

Loki compactor operations and horizontal scaling

Running the component that compacts the index, applies retention and processes deletes: why it is a singleton, its schedules, and the experimental horizontally scalable mode for heavy line-filter deletions.

Loki with Azure Blob Storage and Google Cloud Storage

Configuring Loki for Azure Blob or GCS: authentication options from connection strings to workload identity, container and bucket layout, and the settings that change when moving to the Thanos-based storage clients.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.