From 4350cbf7c4ff4784379669af2af650598f3fd490 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 6 Jun 2024 12:53:49 +0200 Subject: [PATCH] tankstelle: add promtail, prometheus node-exporter for monitoring, configure wireguard between flora-6 and tankstelle --- hosts/default.nix | 2 ++ hosts/flora-6/wireguard.nix | 9 +++++++++ hosts/tankstelle/wireguard.nix | 9 +++++++++ modules/prometheus/default.nix | 6 ++++++ 4 files changed, 26 insertions(+) diff --git a/hosts/default.nix b/hosts/default.nix index f0a54d7e..e1881a43 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -82,6 +82,8 @@ ./tankstelle self.nixosModules.overlays self.nixosModules.core + self.nixosModules.prometheus-exporters + self.nixosModules.promtail ]; }; }; diff --git a/hosts/flora-6/wireguard.nix b/hosts/flora-6/wireguard.nix index f37f8980..3da4e16b 100644 --- a/hosts/flora-6/wireguard.nix +++ b/hosts/flora-6/wireguard.nix @@ -38,6 +38,15 @@ ]; persistentKeepalive = 15; } + { + # tankstelle.pub.solar + endpoint = "80.244.242.5:51820"; + publicKey = "iRTlY1lB7nPXf2eXzX8ZZDkfMmXyGjff5/joccbP8Cg="; + allowedIPs = [ + "10.7.6.4/32" + "fd00:fae:fae:fae:fae:4::/96" + ]; + } ]; }; }; diff --git a/hosts/tankstelle/wireguard.nix b/hosts/tankstelle/wireguard.nix index 2100d436..d8979eba 100644 --- a/hosts/tankstelle/wireguard.nix +++ b/hosts/tankstelle/wireguard.nix @@ -28,6 +28,15 @@ "fd00:fae:fae:fae:fae:1::/96" ]; } + { + # flora-6.pub.solar + endpoint = "80.71.153.210:51820"; + publicKey = "jtSR5G2P/nm9s8WrVc26Xc/SQLupRxyXE+5eIeqlsTU="; + allowedIPs = [ + "10.7.6.2/32" + "fd00:fae:fae:fae:fae:2::/96" + ]; + } ]; }; }; diff --git a/modules/prometheus/default.nix b/modules/prometheus/default.nix index 62a37958..5d0f5f7b 100644 --- a/modules/prometheus/default.nix +++ b/modules/prometheus/default.nix @@ -59,6 +59,12 @@ instance = "metronom"; }; } + { + targets = [ "tankstelle.wg.${config.pub-solar-os.networking.domain}:${toString config.services.prometheus.exporters.node.port}" ]; + labels = { + instance = "tankstelle"; + }; + } ]; } {