prometheus.nodeExporter module: improve after feedback

cc @teh @groxxda @fpletz
This commit is contained in:
Robin Gloster 2016-09-16 15:10:18 +02:00
parent 0ffdb89d95
commit 0201869418
No known key found for this signature in database
GPG Key ID: 5E4C836C632C2882

View File

@ -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 != [])