fix(machines/storage01): scrape all exporter ports

There may be more than one port for a given node.

Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
This commit is contained in:
Ryan Lahfa 2024-12-15 20:46:54 +01:00
parent bb7f538110
commit ecf5fefbaa

View file

@ -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;
};