From f5a5dca445335729be29e503f8edaacc942211d2 Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 10 Feb 2024 20:20:02 -0500 Subject: [PATCH 1/6] monitoring --- nixos/templates/proxmox-lxc.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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"; + #}; } From 8c829762d0770f302880c4dd85150fda79621a30 Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 10 Feb 2024 20:27:11 -0500 Subject: [PATCH 2/6] 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 ] ]; }; From b09092e0ac3542656281526ab1548905f1c9294c Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 10 Feb 2024 20:27:58 -0500 Subject: [PATCH 3/6] monitoring --- nixos/hosts/monitoring/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/hosts/monitoring/default.nix b/nixos/hosts/monitoring/default.nix index 706a26d..d19793b 100644 --- a/nixos/hosts/monitoring/default.nix +++ b/nixos/hosts/monitoring/default.nix @@ -33,7 +33,7 @@ job_name = name; static_configs = [ { - targets = map (port: "${name}.hoki-porgy.ts.net:${toString port}") ports; + targets = map (port: "${name}.hoki-porgy.ts.net:${builtins.toString port}") ports; } ]; }; From ee4c5d8f78124071cab76a1b5b0be83d1aeb3190 Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 10 Feb 2024 20:28:47 -0500 Subject: [PATCH 4/6] monitoring --- nixos/hosts/monitoring/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/hosts/monitoring/default.nix b/nixos/hosts/monitoring/default.nix index d19793b..31d58ff 100644 --- a/nixos/hosts/monitoring/default.nix +++ b/nixos/hosts/monitoring/default.nix @@ -38,7 +38,7 @@ ]; }; in [ - static "aerial" [ 14200 ] + (static "aerial" [ 14200 ]) ]; }; From 62614f968c9c593fda509826fe83df41aefd3f9e Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 10 Feb 2024 20:38:24 -0500 Subject: [PATCH 5/6] monitoring --- nixos/hosts/monitoring/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nixos/hosts/monitoring/default.nix b/nixos/hosts/monitoring/default.nix index 31d58ff..8729f62 100644 --- a/nixos/hosts/monitoring/default.nix +++ b/nixos/hosts/monitoring/default.nix @@ -22,6 +22,17 @@ domain = "monitoring.hoki-porgy.ts.net"; }; }; + + provision = { + enable = true; + datasources.settings.datasources = [ + { + url = "localhost:4000"; + type = "prometheus"; + name = "Prometheus"; + } + ]; + }; }; services.prometheus = { From 6deeb8c3304b64c60771d1d9f45d08c57de44125 Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 10 Feb 2024 20:41:11 -0500 Subject: [PATCH 6/6] monitoring --- nixos/hosts/monitoring/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/hosts/monitoring/default.nix b/nixos/hosts/monitoring/default.nix index 8729f62..d5f212b 100644 --- a/nixos/hosts/monitoring/default.nix +++ b/nixos/hosts/monitoring/default.nix @@ -27,7 +27,7 @@ enable = true; datasources.settings.datasources = [ { - url = "localhost:4000"; + url = "http://localhost:4000"; type = "prometheus"; name = "Prometheus"; }