nixos-config/services/node-exporter.nix
2024-03-03 21:31:50 +01:00

35 lines
710 B
Nix

{ config, lib, ... }:
let
inherit (lib) mkOption types;
cfg = config.my.services.node-exporter;
in {
options.my.services.node-exporter = {
listenAddress = mkOption {
type = types.str;
default = "[::1]";
description = "Address to listen on.";
};
};
config = {
services.prometheus.exporters.node = {
enable = true;
inherit (cfg) listenAddress;
enabledCollectors = [ "systemd" ];
# disable a whole bunch of useless/unneeded collectors
disabledCollectors = [
"arp"
"bcache"
"bonding"
"fibrechannel"
"infiniband"
"ipvs"
"selinux"
"tapestats"
"xfs"
];
};
};
}