Logstash: pass TZ, redirect log output to prevent recursion when using syslogd.

This commit is contained in:
Rob Vermaas 2012-10-30 14:18:51 +01:00
parent 2b19856f40
commit 631fce3c6f

View File

@ -136,13 +136,15 @@ in
mkNameValuePairs = mergeConfigs; mkNameValuePairs = mergeConfigs;
}; };
} ( mkIf cfg.enable { } ( mkIf cfg.enable {
jobs.logstash = with pkgs; { boot.systemd.services.logstash = with pkgs; {
description = "Logstash daemon"; description = "Logstash daemon";
startOn = "started networking and filesystem";
wantedBy = [ "multi-user.target" ];
environment.TZ = config.time.timeZone;
path = [ jre ]; 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 { input {
${exprToConfig cfg.inputConfig} ${exprToConfig cfg.inputConfig}
} }