mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-18 15:34:13 +01:00
19 lines
586 B
Nix
19 lines
586 B
Nix
{
|
|
# enable the node exporter on all nixos hosts
|
|
# https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/services/monitoring/prometheus/exporters/node.nix
|
|
services.prometheus.exporters.node = {
|
|
enable = true;
|
|
listenAddress = "0.0.0.0";
|
|
port = 9100;
|
|
# There're already a lot of collectors enabled by default
|
|
# https://github.com/prometheus/node_exporter?tab=readme-ov-file#enabled-by-default
|
|
enabledCollectors = [
|
|
"systemd"
|
|
"logind"
|
|
];
|
|
|
|
# use either enabledCollectors or disabledCollectors
|
|
# disabledCollectors = [];
|
|
};
|
|
}
|