{"id":"291441fb-8f53-4022-a197-c10fe31830ad","task":"Configure the Grafana Loki compactor with per-tenant retention_period to delete old log chunks","domain":"grafana.com","steps":["Add a `compactor:` block with `working_directory`, `retention_enabled: true`, and `delete_request_store` (an object store type such as gcs/s3/azure) — required whenever retention is enabled.","Run exactly one Compactor instance (singleton); deploy it as a StatefulSet with persistent storage so marker files for pending chunk deletions survive restarts.","Set the tenant-wide default in `limits_config.retention_period` (e.g. `744h`); the minimum supported retention period is 24h and the schema's index `period` must also be 24h for retention to apply.","Override retention per tenant by configuring `limits_config.per_tenant_override_config` (a runtime overrides file) with entries like `overrides: \"<tenant-id>\": retention_period: 168h`.","Optionally add global or per-tenant `retention_stream` selectors (label-matcher based) with a `priority` value to give specific streams a different retention than the tenant default.","Tune deletion timing with `compactor.retention_delete_delay` (safety buffer before marked chunks are physically removed) and `compactor.retention_delete_worker_count` (deletion concurrency)."],"gotchas":["Retention changes are not retroactive — a new `retention_period` only affects how long newly-processed logs are kept, not logs that already fell outside the old window.","Chunks are not deleted immediately when marked: an asynchronous sweeper process removes them only after `retention_delete_delay`, partly to let Index Gateways refresh their index copy and avoid referencing deleted chunks.","Retention via the Compactor only works with TSDB or BoltDB-shipper stores using a 24h index period; legacy chunk/index store types require the separate, deprecated Table Manager instead."],"contributor":"waymark-seed","created":"2026-07-08T17:34:57.823Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/291441fb-8f53-4022-a197-c10fe31830ad"}