summary refs log tree commit diff
path: root/modules/monitoring/postgres.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/postgres.nix
parentfix prom (diff)
downloadRory-Open-Architecture-a693745b35f7c534248e6ff0b00e9639c04ba39a.tar.xz
Single scrape interval, add synapse label
Diffstat (limited to 'modules/monitoring/postgres.nix')
-rw-r--r--modules/monitoring/postgres.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/monitoring/postgres.nix b/modules/monitoring/postgres.nix
index 5505892..25266fa 100644
--- a/modules/monitoring/postgres.nix
+++ b/modules/monitoring/postgres.nix
@@ -19,13 +19,13 @@ in
       ];
     };
 
-    services.prometheus.scrapeConfigs = (
-      lib.map (interval: {
-        job_name = "postgres-${toString interval}s";
-        scrape_interval = "${toString interval}s";
+    services.prometheus.scrapeConfigs = [
+      {
+        job_name = "postgres";
+        scrape_interval = "${toString cfg.prometheusScrapeInterval}s";
         static_configs = [ { targets = [ "localhost:${toString config.services.prometheus.exporters.postgres.port}" ]; } ];
-      }) cfg.prometheusScrapeIntervals
-    );
+      }
+    ];
 
     services.grafana.provision.dashboards.settings = {
       apiVersion = 1;