about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-08-01 22:39:03 +0900
committersefidel <contact@sefidel.net>2023-08-02 00:59:01 +0900
commit65e20c47e3f1662b4eaa6331436a4b222bed79f2 (patch)
treecbce39df9b3db91c0cb79664c3f9e317b76a32a8 /modules
parent16b152717dc463b3973c7692f387f439aacba2dc (diff)
downloadinfra-65e20c47e3f1662b4eaa6331436a4b222bed79f2.tar.gz
infra-65e20c47e3f1662b4eaa6331436a4b222bed79f2.zip
feat(modules/metrics): set retention period of loki logs for 120h
Diffstat (limited to 'modules')
-rw-r--r--modules/services/metrics.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/services/metrics.nix b/modules/services/metrics.nix
index 145d1fe..6496a23 100644
--- a/modules/services/metrics.nix
+++ b/modules/services/metrics.nix
@@ -48,6 +48,7 @@ in
             ring.replication_factor = 1;
             final_sleep = "0s";
           };
+
           chunk_idle_period = "1h";
           max_chunk_age = "1h";
           chunk_target_size = 1048576; # 1.5M
@@ -82,6 +83,8 @@ in
         limits_config = {
           reject_old_samples = true;
           reject_old_samples_max_age = "168h";
+
+          retention_period = "120h";
         };
 
         chunk_store_config = {
@@ -89,8 +92,8 @@ in
         };
 
         table_manager = {
-          retention_deletes_enabled = false;
-          retention_period = "0s";
+          retention_deletes_enabled = true;
+          retention_period = "120h";
         };
 
         compactor = {