diff options
Diffstat (limited to 'modules/node-exporter.nix')
-rw-r--r-- | modules/node-exporter.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/node-exporter.nix b/modules/node-exporter.nix new file mode 100644 index 0000000..8e76903 --- /dev/null +++ b/modules/node-exporter.nix @@ -0,0 +1,36 @@ +{ + config, + lib, + this, + ... +}: +with lib; +let + cfg = config.nixfiles.modules.node-exporter; +in +{ + options.nixfiles.modules.node-exporter.enable = mkEnableOption "Prometheus Node Exporter"; + + config = mkIf cfg.enable { + services.prometheus.exporters.node = { + enable = true; + listenAddress = mkDefault this.wireguard.ipv4.address; + port = 9100; + enabledCollectors = [ + "buddyinfo" + "cgroups" + "ethtool" + "interrupts" + "ksmd" + "lnstat" + "logind" + "mountstats" + "network_route" + "processes" + "qdisc" + "systemd" + "zoneinfo" + ]; + }; + }; +} |