mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
prometheus.nodeExporter module: improve after feedback
cc @teh @groxxda @fpletz
This commit is contained in:
parent
0ffdb89d95
commit
0201869418
@ -48,13 +48,10 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = [ cfg.port ];
|
||||
|
||||
systemd.services.prometheus-node-exporter = {
|
||||
description = "Prometheus exporter for machine metrics";
|
||||
unitConfig.Documentation = "https://github.com/prometheus/node_exporter";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
exec ${pkgs.prometheus-node-exporter}/bin/node_exporter \
|
||||
${optionalString (cfg.enabledCollectors != [])
|
||||
|
Loading…
Reference in New Issue
Block a user