12.2.1.Loki compactor not running compaction
The Loki compactor in {{ $labels.namespace }} has not completed a successful compaction in over 3 hours (or never since startup), leaving index growth unbounded and retention unenforced.
# 3-hour threshold is a rough default; depends on your ingestion volume and configured compaction schedule — adjust based on your workload.
- alert: LokiCompactorNotRunningCompaction
expr: min(time() - (loki_boltdb_shipper_compact_tables_operation_last_successful_run_timestamp_seconds > 0)) by (cluster, namespace) > 10800 or max(max_over_time(loki_boltdb_shipper_compact_tables_operation_last_successful_run_timestamp_seconds[3h])) by (cluster, namespace) == 0
for: 1h
labels:
severity: critical
annotations:
summary: Loki compactor not running compaction (instance {{ $labels.instance }})
description: "The Loki compactor in {{ $labels.namespace }} has not completed a successful compaction in over 3 hours (or never since startup), leaving index growth unbounded and retention unenforced.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"

