Merge pull request #3005 from offlinehacker/nixos/logstash/enableWeb
nixos/logstash: add enableWeb option to enable kibana web interface
This commit is contained in:
commit
6d006a9cca
@ -17,6 +17,11 @@ in
|
|||||||
description = "Enable logstash";
|
description = "Enable logstash";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableWeb = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Enable logstash web interface";
|
||||||
|
};
|
||||||
|
|
||||||
inputConfig = mkOption {
|
inputConfig = mkOption {
|
||||||
default = ''stdin { type => "example" }'';
|
default = ''stdin { type => "example" }'';
|
||||||
description = "Logstash input configuration";
|
description = "Logstash input configuration";
|
||||||
@ -62,7 +67,7 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.services.logstash = with pkgs; {
|
systemd.services.logstash = with pkgs; {
|
||||||
description = "Logstash daemon";
|
description = "Logstash Daemon";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
@ -78,7 +83,7 @@ in
|
|||||||
output {
|
output {
|
||||||
${cfg.outputConfig}
|
${cfg.outputConfig}
|
||||||
}
|
}
|
||||||
''}";
|
''} ${optionalString cfg.enableWeb "-- web"}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user