From 7682e01479d146f4ab252ff86bf0b6bfa42864be Mon Sep 17 00:00:00 2001 From: clerie Date: Sun, 21 Feb 2021 22:39:57 +0100 Subject: [PATCH] Connect porter to monitoring --- hosts/monitoring-3/configuration.nix | 19 ++++++++++++------- hosts/porter/configuration.nix | 6 ++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/hosts/monitoring-3/configuration.nix b/hosts/monitoring-3/configuration.nix index 786ff1b..af55a97 100644 --- a/hosts/monitoring-3/configuration.nix +++ b/hosts/monitoring-3/configuration.nix @@ -22,24 +22,28 @@ networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ]; networking.hosts = { - "::1" = [ "monitoring-3.mon.clerie.de" ]; + "fd00:327:327:327::1" = [ "monitoring-3.mon.clerie.de" ]; + "fd00:327:327:327::102" = [ "porter.mon.clerie.de" ]; }; networking.wireguard.enable = true; networking.wireguard.interfaces = { wg-monitoring = { ips = [ "fd00:327:327:327::1/64" ]; + listenPort = 54523; peers = [ - #{ - # # porter - # allowedIPs = [ "fd00:327:327:327::1:1/64" ]; - # publicKey = "0000000000000000000000000000000000000000000="; - #} + { + # porter + allowedIPs = [ "fd00:327:327:327::102/128" ]; + publicKey = "+mJN+ustPo2ehP0wqajYs3nTdJ0SPuIDyiZQSHFIK3o="; + } ]; - listenPort = 50128; privateKeyFile = "/var/src/secrets/wireguard/wg-monitoring"; }; }; + + networking.firewall.allowedUDPPorts = [ 54523 ]; + services.prometheus.exporters.node.enable = true; services.prometheus = { @@ -65,6 +69,7 @@ { targets = [ "monitoring-3.mon.clerie.de:9100" + "porter.mon.clerie.de:9100" ]; } ]; diff --git a/hosts/porter/configuration.nix b/hosts/porter/configuration.nix index 3c7e4fc..2041318 100644 --- a/hosts/porter/configuration.nix +++ b/hosts/porter/configuration.nix @@ -165,5 +165,11 @@ } ''; + clerie.monitoring = { + enable = true; + id = "102"; + pubkey = ""; + }; + system.stateVersion = "21.03"; }