From ecf5fefbaaff9a8eebf68500d9f6eb309eca416a Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Sun, 15 Dec 2024 20:46:54 +0100 Subject: [PATCH] fix(machines/storage01): scrape all exporter ports There may be more than one port for a given node. Signed-off-by: Ryan Lahfa --- machines/nixos/storage01/prometheus.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/machines/nixos/storage01/prometheus.nix b/machines/nixos/storage01/prometheus.nix index 0c23a60..d19f0a3 100644 --- a/machines/nixos/storage01/prometheus.nix +++ b/machines/nixos/storage01/prometheus.nix @@ -18,7 +18,9 @@ let node: { config, ... }: lib.optional config.dgn-node-monitoring.enable { - targets = [ "${node}.dgnum:${builtins.toString config.dgn-node-monitoring.port}" ]; + targets = map (p: "${node}.dgnum:${builtins.toString p}") ( + builtins.attrValues config.dgn-node-monitoring.ports + ); labels = { host = node; };