lol

prometheus-node-exporter service: add disabledCollectors option

+11 -1
+11 -1
nixos/modules/services/monitoring/prometheus/node-exporter.nix
··· 37 37 ''; 38 38 }; 39 39 40 + disabledCollectors = mkOption { 41 + type = types.listOf types.str; 42 + default = []; 43 + example = ''[ "timex" ]''; 44 + description = '' 45 + Collectors to disable which are enabled by default. 46 + ''; 47 + }; 48 + 40 49 extraFlags = mkOption { 41 50 type = types.listOf types.str; 42 51 default = []; ··· 64 73 wantedBy = [ "multi-user.target" ]; 65 74 script = '' 66 75 exec ${pkgs.prometheus-node-exporter}/bin/node_exporter \ 67 - ${concatMapStrings (x: "--collector." + x + " ") cfg.enabledCollectors} \ 76 + ${concatMapStringsSep " " (x: "--collector." + x) cfg.enabledCollectors} \ 77 + ${concatMapStringsSep " " (x: "--no-collector." + x) cfg.disabledCollectors} \ 68 78 --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ 69 79 ${concatStringsSep " \\\n " cfg.extraFlags} 70 80 '';