From 219b67df201ec9cd64c725621214f8e84f55d0d3 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 8 Dec 2023 17:31:03 +0100 Subject: [PATCH] fix: add 4 logs retention for loki --- hosts/flora-6/apps/loki.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hosts/flora-6/apps/loki.nix b/hosts/flora-6/apps/loki.nix index 943b001..63a534f 100644 --- a/hosts/flora-6/apps/loki.nix +++ b/hosts/flora-6/apps/loki.nix @@ -28,7 +28,16 @@ }; }; }; - + # Keep logs for 4 weeks + # https://grafana.com/docs/loki/latest/operations/storage/retention/ + limits_config.retention_period = "4w"; + compactor = { + shared_store = "filesystem"; + compaction_interval = "10m"; + retention_enabled = true; + retention_delete_delay = "2h"; + retention_delete_worker_count = 150; + }; schema_config = { configs = [{ from = "2020-05-15";