1
0

Connect porter to monitoring

This commit is contained in:
clerie 2021-02-21 22:39:57 +01:00
parent 16d1ebe156
commit 7682e01479
2 changed files with 18 additions and 7 deletions

View File

@ -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"
];
}
];

View File

@ -165,5 +165,11 @@
}
'';
clerie.monitoring = {
enable = true;
id = "102";
pubkey = "";
};
system.stateVersion = "21.03";
}