nix-infra/common/fragments/prometheus_exporters.nix

17 lines
324 B
Nix

{ config, pkgs, ... }: {
# Enable Prometheus exporters
services.prometheus = {
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 9002;
};
};
};
networking.firewall.allowedTCPPorts =
[ config.services.prometheus.exporters.node.port ];
}