From d13c5f87e1c31c2b134f9604214808be45ac8ff9 Mon Sep 17 00:00:00 2001 From: xunuwu Date: Wed, 15 Jan 2025 12:42:34 +0100 Subject: [PATCH] prometheus changes --- nix/machines/hopper/lab/default.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nix/machines/hopper/lab/default.nix b/nix/machines/hopper/lab/default.nix index 113a236..463f11b 100644 --- a/nix/machines/hopper/lab/default.nix +++ b/nix/machines/hopper/lab/default.nix @@ -356,16 +356,16 @@ in { extraFlags = ["--storage.tsdb.retention.time=30d"]; scrapeConfigs = [ { - job_name = config.networking.hostName; - static_configs = [ - { - targets = [ - "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" - "127.0.0.1:${toString config.services.prometheus.exporters.systemd.port}" - # "127.0.0.1:${toString config.services.prometheus.exporters.wireguard.port}" - ]; - } - ]; + job_name = "node"; + static_configs = lib.singleton { + targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"]; + }; + } + { + job_name = "systemd"; + static_configs = lib.singleton { + targets = ["127.0.0.1:${toString config.services.prometheus.exporters.systemd.port}"]; + }; } ]; };