1
0
Fork 0
forked from pub-solar/infra

metronom: add promtail, prometheus node-exporter

configure wireguard to push logs to and scrape metrics from flora-6

open firewall for node-exporter port on wg-ssh interface
This commit is contained in:
teutat3s 2024-06-06 12:52:55 +02:00
parent 6143f56c01
commit b93608a8fa
Signed by untrusted user: teutat3s
GPG key ID: 4FA1D3FA524F22C1
4 changed files with 21 additions and 0 deletions

View file

@ -68,6 +68,8 @@
self.nixosModules.unlock-zfs-on-boot
self.nixosModules.core
self.nixosModules.mail
self.nixosModules.prometheus-exporters
self.nixosModules.promtail
self.inputs.simple-nixos-mailserver.nixosModule
];

View file

@ -28,6 +28,16 @@
"fd00:fae:fae:fae:fae:1::/96"
];
}
{
# metronom.pub.solar
endpoint = "49.13.236.167:51820";
publicKey = "zOSYGO7MfnOOUnzaTcWiKRQM0qqxR3JQrwx/gtEtHmo=";
allowedIPs = [
"10.7.6.3/32"
"fd00:fae:fae:fae:fae:3::/96"
];
persistentKeepalive = 15;
}
];
};
};

View file

@ -1,5 +1,8 @@
{ config, ... }:
{
# Only expose prometheus exporter port via wireguard interface
networking.firewall.interfaces.wg-ssh.allowedTCPPorts = [ 9002 ];
services.prometheus = {
exporters = {
node = {

View file

@ -53,6 +53,12 @@
instance = "nachtigall";
};
}
{
targets = [ "metronom.wg.${config.pub-solar-os.networking.domain}:${toString config.services.prometheus.exporters.node.port}" ];
labels = {
instance = "metronom";
};
}
];
}
{