summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-08-29 16:54:04 +0200
committerRory& <root@rory.gay>2024-08-29 16:54:04 +0200
commitcf6065d1a23db3508128a9ef03844ed58b427608 (patch)
tree9d42aa2910c382e1d12baff5112bda557c91f39c
parentFix synapse metrics 2 (diff)
downloadRory-Open-Architecture-cf6065d1a23db3508128a9ef03844ed58b427608.tar.xz
Drop non-1s measurements
-rw-r--r--modules/monitoring/module.nix9
-rw-r--r--modules/monitoring/synapse.nix11
2 files changed, 14 insertions, 6 deletions
diff --git a/modules/monitoring/module.nix b/modules/monitoring/module.nix
index 60e396d..1197643 100644
--- a/modules/monitoring/module.nix
+++ b/modules/monitoring/module.nix
@@ -32,9 +32,9 @@ in
       type = lib.types.listOf lib.types.int;
       default = [
         1
-        2
-        5
-        15
+        #2 # kinda pointless?
+        #5 # doesnt help with reliability
+        #15 # might aswell just use a 15s interval on grafana
       ];
       description = "Scrape intervals for Prometheus";
     };
@@ -45,6 +45,9 @@ in
       prometheus = lib.mkIf (cfg.localPrometheus) {
         enable = true;
         listenAddress = "127.0.0.1";
+        extraFlags = [
+          "--storage.tsdb.wal-compression=true"
+        ];
       };
       grafana = lib.mkIf (cfg.localGrafana) {
         enable = true;
diff --git a/modules/monitoring/synapse.nix b/modules/monitoring/synapse.nix
index dcb389a..a279a3d 100644
--- a/modules/monitoring/synapse.nix
+++ b/modules/monitoring/synapse.nix
@@ -10,7 +10,7 @@ in
         type = "metrics";
         port = 9200;
         tls = false;
-        resources = [];
+        resources = [ ];
       }
     ];
 
@@ -56,7 +56,7 @@ in
               {
                 type = "metrics";
                 port = 9200 + index + 1;
-                resources = [];
+                resources = [ ];
               }
             ];
           };
@@ -77,7 +77,12 @@ in
           lib.map (interval: {
             job_name = "synapse-${workerName}-${toString interval}s";
             scrape_interval = "${toString interval}s";
-            static_configs = [ { targets = [ "localhost:${toString (9200 + index + 1)}" ]; } ];
+            static_configs = [ 
+            { 
+            targets = [ "localhost:${toString (9200 + index + 1)}" ];
+            
+             } 
+            ];
             metrics_path = "_synapse/metrics";
           }) cfg.prometheusScrapeIntervals
         ) config.monitoring.synapse.workerNames