summary refs log tree commit diff
path: root/modules/monitoring/system.nix
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-09-02 20:19:00 +0200
committerRory& <root@rory.gay>2024-09-02 20:19:00 +0200
commita693745b35f7c534248e6ff0b00e9639c04ba39a (patch)
tree70b5583276729cc851e72bedb1753c1e11a11b8e /modules/monitoring/system.nix
parentfix prom (diff)
downloadRory-Open-Architecture-a693745b35f7c534248e6ff0b00e9639c04ba39a.tar.xz
Single scrape interval, add synapse label
Diffstat (limited to '')
-rw-r--r--modules/monitoring/system.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/monitoring/system.nix b/modules/monitoring/system.nix
index cc1ec66..171a7af 100644
--- a/modules/monitoring/system.nix
+++ b/modules/monitoring/system.nix
@@ -46,13 +46,13 @@ in
       ];
     };
 
-    services.prometheus.scrapeConfigs = (
-        lib.map (interval: {
-            job_name = "node-${toString interval}s";
-            scrape_interval = "${toString interval}s";
-            static_configs = [ { targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; } ];
-        }) cfg.prometheusScrapeIntervals
-    );
+    services.prometheus.scrapeConfigs = [
+      {
+        job_name = "node";
+        scrape_interval = "${toString cfg.prometheusScrapeInterval}s";
+        static_configs = [ { targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; } ];
+      }
+    ];
 
     services.grafana.provision.dashboards.settings = {
       apiVersion = 1;