summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2014-06-18 13:36:53 +0200
committerJaka Hudoklin <jakahudoklin@gmail.com>2014-06-18 13:37:13 +0200
commitdb8de47ce7ac0932dceb9e7cb14723f92c4aa8a1 (patch)
tree7950ed66bbf231c0a481db8af5291cec73f5efe4 /nixos
parent36e6eda5fc21e655b172a3c8a445930bafb64e73 (diff)
downloadnixlib-db8de47ce7ac0932dceb9e7cb14723f92c4aa8a1.tar
nixlib-db8de47ce7ac0932dceb9e7cb14723f92c4aa8a1.tar.gz
nixlib-db8de47ce7ac0932dceb9e7cb14723f92c4aa8a1.tar.bz2
nixlib-db8de47ce7ac0932dceb9e7cb14723f92c4aa8a1.tar.lz
nixlib-db8de47ce7ac0932dceb9e7cb14723f92c4aa8a1.tar.xz
nixlib-db8de47ce7ac0932dceb9e7cb14723f92c4aa8a1.tar.zst
nixlib-db8de47ce7ac0932dceb9e7cb14723f92c4aa8a1.zip
nixos/logstash: add enableWeb option to enable kibana web interface
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/logging/logstash.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/nixos/modules/services/logging/logstash.nix b/nixos/modules/services/logging/logstash.nix
index 480e35a1156d..c92c81135704 100644
--- a/nixos/modules/services/logging/logstash.nix
+++ b/nixos/modules/services/logging/logstash.nix
@@ -17,6 +17,11 @@ in
         description = "Enable logstash";
       };
 
+      enableWeb = mkOption {
+        default = false;
+        description = "Enable logstash web interface";
+      };
+
       inputConfig = mkOption {
         default = ''stdin { type => "example" }'';
         description = "Logstash input configuration";
@@ -62,7 +67,7 @@ in
 
   config = mkIf cfg.enable {
     systemd.services.logstash = with pkgs; {
-      description = "Logstash daemon";
+      description = "Logstash Daemon";
       wantedBy = [ "multi-user.target" ];
 
       serviceConfig = {
@@ -78,7 +83,7 @@ in
           output {
             ${cfg.outputConfig}
           }
-        ''}";
+        ''} ${optionalString cfg.enableWeb "-- web"}";
       };
     };
   };