forked from mirrors/nixpkgs
Logstash: pass TZ, redirect log output to prevent recursion when using syslogd.
This commit is contained in:
parent
2b19856f40
commit
631fce3c6f
|
@ -136,13 +136,15 @@ in
|
|||
mkNameValuePairs = mergeConfigs;
|
||||
};
|
||||
} ( mkIf cfg.enable {
|
||||
jobs.logstash = with pkgs; {
|
||||
boot.systemd.services.logstash = with pkgs; {
|
||||
description = "Logstash daemon";
|
||||
startOn = "started networking and filesystem";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment.TZ = config.time.timeZone;
|
||||
|
||||
path = [ jre ];
|
||||
|
||||
script = "cd /tmp && exec java -jar ${logstash} agent -f ${writeText "logstash.conf" ''
|
||||
script = "cd /tmp && exec java -jar ${logstash} agent -f ${writeText "logstash.conf" &> /var/log/logstash.log ''
|
||||
input {
|
||||
${exprToConfig cfg.inputConfig}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue