2026-05-01 22:39:21 +02:00
|
|
|
{ lib, config, ... }:
|
2025-12-08 20:48:52 +01:00
|
|
|
{
|
2026-05-01 22:39:21 +02:00
|
|
|
options.my.prometheusNode.enable = lib.mkEnableOption "Prometheus node exporter";
|
|
|
|
|
|
|
|
|
|
config = lib.mkIf config.my.prometheusNode.enable {
|
|
|
|
|
services.prometheus.exporters = {
|
|
|
|
|
node = {
|
|
|
|
|
enable = true;
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
port = 9190;
|
|
|
|
|
enabledCollectors = [
|
|
|
|
|
# keep-sorted start
|
|
|
|
|
"cgroups"
|
|
|
|
|
"interrupts"
|
|
|
|
|
"softirqs"
|
|
|
|
|
"swap"
|
|
|
|
|
"systemd"
|
|
|
|
|
"tcpstat"
|
|
|
|
|
"wifi"
|
|
|
|
|
# keep-sorted end
|
|
|
|
|
];
|
|
|
|
|
};
|
2025-12-08 20:48:52 +01:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|