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