diff --git a/nixos/hosts/monitoring/default.nix b/nixos/hosts/monitoring/default.nix index ae6fe18..d5f212b 100644 --- a/nixos/hosts/monitoring/default.nix +++ b/nixos/hosts/monitoring/default.nix @@ -22,19 +22,34 @@ domain = "monitoring.hoki-porgy.ts.net"; }; }; + + provision = { + enable = true; + datasources.settings.datasources = [ + { + url = "http://localhost:4000"; + type = "prometheus"; + name = "Prometheus"; + } + ]; + }; }; services.prometheus = { 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:${builtins.toString port}") ports; + } + ]; + }; + in [ + (static "aerial" [ 14200 ]) ]; }; diff --git a/nixos/templates/proxmox-lxc.nix b/nixos/templates/proxmox-lxc.nix index 2246e79..d560258 100644 --- a/nixos/templates/proxmox-lxc.nix +++ b/nixos/templates/proxmox-lxc.nix @@ -24,7 +24,7 @@ serviceConfig.Restart = "always"; }; - services.tailscale = { - interfaceName = "userspace-networking"; - }; + #services.tailscale = { + # interfaceName = "userspace-networking"; + #}; }