summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Digel <tim.digel@active-group.de>2019-06-03 14:27:51 +0200
committerTim Digel <tim.digel@active-group.de>2019-08-14 08:26:13 +0200
commit5bbde1e1cab31e7559fb76f0fd22aac5d1e561fe (patch)
tree0d82a36c0fbad25c5d64894fcb62dc9ff0b9d822
parent453d108417973c33094d78ed8759df8140ade88c (diff)
downloadnixpkgs-5bbde1e1cab31e7559fb76f0fd22aac5d1e561fe.tar
nixpkgs-5bbde1e1cab31e7559fb76f0fd22aac5d1e561fe.tar.gz
nixpkgs-5bbde1e1cab31e7559fb76f0fd22aac5d1e561fe.tar.bz2
nixpkgs-5bbde1e1cab31e7559fb76f0fd22aac5d1e561fe.tar.lz
nixpkgs-5bbde1e1cab31e7559fb76f0fd22aac5d1e561fe.tar.xz
nixpkgs-5bbde1e1cab31e7559fb76f0fd22aac5d1e561fe.tar.zst
nixpkgs-5bbde1e1cab31e7559fb76f0fd22aac5d1e561fe.zip
nixos/riemann-tools: Add ExtraArgs Config Option
Added option "extraArgs" to forward any switches to riemann-tools.
-rw-r--r--nixos/modules/services/monitoring/riemann-tools.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/services/monitoring/riemann-tools.nix b/nixos/modules/services/monitoring/riemann-tools.nix
index 9c400a1e3e4..2b647b6b1ad 100644
--- a/nixos/modules/services/monitoring/riemann-tools.nix
+++ b/nixos/modules/services/monitoring/riemann-tools.nix
@@ -11,7 +11,7 @@ let
 
   healthLauncher = writeScriptBin "riemann-health" ''
     #!/bin/sh
-    exec ${pkgs.riemann-tools}/bin/riemann-health --host ${riemannHost}
+    exec ${pkgs.riemann-tools}/bin/riemann-health ${builtins.concatStringsSep " " cfg.extraArgs} --host ${riemannHost}
   '';
 
 
@@ -34,8 +34,16 @@ in {
           Address of the host riemann node. Defaults to localhost.
         '';
       };
+      extraArgs = mkOption {
+        type = types.listOf types.string;
+        default = [];
+        description = ''
+          A list of commandline-switches forwarded to a riemann-tool.
+          See for example `riemann-health --help` for available options.
+        '';
+        example = ["-p 5555" "--timeout=30" "--attribute=myattribute=42"];
+      };
     };
-
   };
 
   config = mkIf cfg.enableHealth {