feat: add prometheus exporter

This commit is contained in:
Katharina Heidenreich 2026-04-11 12:53:19 +02:00
parent 059bac76d1
commit 40d78422cf
2 changed files with 20 additions and 0 deletions

View file

@ -39,4 +39,12 @@ rec {
port = 8081; port = 8081;
}; };
"metric-exporter" = {
port = 9100;
collectors = [
"systemd"
"processes"
"thermal_zone"
];
};
} }

View file

@ -0,0 +1,12 @@
{ config, pkgs, lib, ... }:
let
serv = import ../config/services.nix;
in {
services.prometheus.exporters.node = {
enable = true;
port = serv."metric-exporter".port;
enabledCollectors = serv."metric-exporter".collectors;
};
networking.firewall.allowedTCPPorts = [ serv."metric-exporter".port ];
}