nixos-config/modules/services/monitoring.nix
Ahwx 466985729c feat: open firewall so that violet can talk to dandelion :p
TODO: inter-server-networking with a virtual LAN over WireGuard
2025-04-24 12:05:25 +02:00

33 lines
663 B
Nix

{ config, ... }:
{
services = {
prometheus = {
enable = true;
port = 9001;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 9002;
};
};
scrapeConfigs = [
{
job_name = "${config.networking.hostName}";
static_configs = [
{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
}
];
}
];
};
};
networking.firewall = {
allowedTCPPorts = [
9001
22
9123 # always also allow ssh :screaming:
];
};
}