From 47ebaca737350c2b5690ebccba44a23c3f1522ca Mon Sep 17 00:00:00 2001 From: Giacomo Sanchietti Date: Tue, 27 Feb 2024 18:29:40 +0100 Subject: [PATCH] loki: configure --- imageroot/actions/configure-module/20configure | 1 + imageroot/etc/loki.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/imageroot/actions/configure-module/20configure b/imageroot/actions/configure-module/20configure index 5e5a2c4..e7a8bda 100755 --- a/imageroot/actions/configure-module/20configure +++ b/imageroot/actions/configure-module/20configure @@ -71,6 +71,7 @@ with open('promtail.env', 'w') as promtail: with open('loki.env', 'w') as lfp: lfp.write(f"LOKI_HTTP_PORT={ports[5]}\n") lfp.write(f"LOKI_GRPC_PORT={ports[5]}\n") + lfp.write(f"LOKI_RETENTION={request.get('loki_rentention', '180d')}\n") with open('grafana.env', 'w') as gfp: pass diff --git a/imageroot/etc/loki.yaml b/imageroot/etc/loki.yaml index 20cfb37..c3617e9 100644 --- a/imageroot/etc/loki.yaml +++ b/imageroot/etc/loki.yaml @@ -24,7 +24,7 @@ query_range: max_size_mb: 100 limits_config: - retention_period: 168h + retention_period: ${LOKI_RETENTION} compactor: working_directory: /data/retention