3
0
Fork 0
forked from mirrors/nixpkgs

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;
};
} ( 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}
}