From 1ea703bfa13da4bbcfa4a897ce8434c9bbb00f6a Mon Sep 17 00:00:00 2001 From: daragh Date: Thu, 23 May 2024 01:27:02 +0100 Subject: [PATCH] Removed redundant conf, rename portcollecter --- applications/prometheus.nix | 6 +++--- machines/marvin.nix | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/applications/prometheus.nix b/applications/prometheus.nix index 67d1ca0..e4fd5e0 100644 --- a/applications/prometheus.nix +++ b/applications/prometheus.nix @@ -36,7 +36,7 @@ in { }; }; - collecter_port = mkOption { + port_collecter = mkOption { type = types.port; default = 9002; }; @@ -48,7 +48,7 @@ in { enable = true; # most collectors are on by default see docs for more options enabledCollectors = ["systemd"]; - port = cfg.collecter_port; + port = cfg.port_collecter; }; } // mkIf cfg.server.enable { @@ -60,7 +60,7 @@ in { job_name = "node_exporter"; static_configs = [ { - targets = (map (hostname: "${hostname}:${collecter_port}") (lib.attrsets.mapAttrsToList (server: server.deployment.hostname)) nodes) ++ cfg.other_nodes; + targets = (map (hostname: "${hostname}:${cfg.port_collecter}") (lib.attrsets.mapAttrsToList (server: server.deployment.hostname)) nodes) ++ cfg.other_nodes; } ]; } diff --git a/machines/marvin.nix b/machines/marvin.nix index 191f0a5..e4df5dc 100644 --- a/machines/marvin.nix +++ b/machines/marvin.nix @@ -58,8 +58,6 @@ in { ip = ip_pub; name = name; }; - - port = 9001; }; };