server-configs/machines/gerd/services/monitoring/mon-node-exporter.nix

23 lines
436 B
Nix

{ config, lib, ... }:
{
services.prometheus.exporters.node = {
enable = true;
listenAddress = "localhost";
enabledCollectors = [
"cpu"
"filesystem"
"systemd"
];
};
services.prometheus.scrapeConfigs = [
{
job_name = "node-exporter";
static_configs = [{
targets = [ "localhost:${builtins.toString config.services.prometheus.exporters.node.port}"];
}];
}
];
}