git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/riemann-tools: Add ExtraArgs Config Option

Added option "extraArgs" to forward any switches to riemann-tools.

commit5bbde1e1cab31e7559fb76f0fd22aac5d1e561fe authorTim Digel <tim.digel@active-group.de> dateMon 3 Jun 2019, 14:27 (7 years ago) parent453d108
1 file changed+10−2
nixos/modules/services/monitoring/riemann-tools.nix+10−2
nixos/modules/services/monitoring/riemann-tools.nix+10−2
@@ -11,7 +11,7 @@ let
1111
1212 healthLauncher = writeScriptBin "riemann-health" ''
1313 #!/bin/sh
14− exec ${pkgs.riemann-tools}/bin/riemann-health --host ${riemannHost}
14+ exec ${pkgs.riemann-tools}/bin/riemann-health ${builtins.concatStringsSep " " cfg.extraArgs} --host ${riemannHost}
1515 '';
1616
1717
@@ -34,8 +34,16 @@ in {
3434 Address of the host riemann node. Defaults to localhost.
3535 '';
3636 };
37+ extraArgs = mkOption {
38+ type = types.listOf types.string;
39+ default = [];
40+ description = ''
41+ A list of commandline-switches forwarded to a riemann-tool.
42+ See for example `riemann-health --help` for available options.
43+ '';
44+ example = ["-p 5555" "--timeout=30" "--attribute=myattribute=42"];
45+ };
3746 };
38−
3947 };
4048
4149 config = mkIf cfg.enableHealth {