feat: add node exporter
This commit is contained in:
parent
02c1987c92
commit
db4039a414
3 changed files with 22 additions and 0 deletions
|
|
@ -20,4 +20,12 @@
|
||||||
turn_relay_range_start = 50300;
|
turn_relay_range_start = 50300;
|
||||||
turn_relay_range_end = 50400;
|
turn_relay_range_end = 50400;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"metric-exporter" = {
|
||||||
|
port = 9100;
|
||||||
|
collectors = [
|
||||||
|
"systemd"
|
||||||
|
"processes"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -4,5 +4,6 @@
|
||||||
./openssh.nix
|
./openssh.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
./livekit.nix
|
./livekit.nix
|
||||||
|
./node-exporter.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
13
services/node-exporter.nix
Normal file
13
services/node-exporter.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
serv = import ../config/services.nix;
|
||||||
|
in {
|
||||||
|
services.prometheus.exporters.node = {
|
||||||
|
enable = true;
|
||||||
|
port = serv."metric-exporter".port;
|
||||||
|
enabledCollectors = serv."metric-exporter".collectors;
|
||||||
|
listenAddress = "127.0.0.1";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ serv."metric-exporter".port ];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue