From 8c829762d0770f302880c4dd85150fda79621a30 Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 10 Feb 2024 20:27:11 -0500 Subject: [PATCH] monitoring --- nixos/hosts/monitoring/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nixos/hosts/monitoring/default.nix b/nixos/hosts/monitoring/default.nix index ae6fe18..706a26d 100644 --- a/nixos/hosts/monitoring/default.nix +++ b/nixos/hosts/monitoring/default.nix @@ -28,13 +28,17 @@ enable = true; port = 4000; - scrapeConfigs = [ - { - job_name = "aerial"; + scrapeConfigs = let + static = name: ports: { + job_name = name; static_configs = [ - { targets = ["100.111.27.103:14200"]; } - ]; - } + { + targets = map (port: "${name}.hoki-porgy.ts.net:${toString port}") ports; + } + ]; + }; + in [ + static "aerial" [ 14200 ] ]; };