Log to systemd journal

Let's align to InfluxDB 1.0 logging policy and log to systemd journal by
default.

closes #1732
This commit is contained in:
Ririsoft 2016-09-08 22:44:34 +02:00 committed by Cameron Sparr
parent 8dc42ad9f2
commit 5913f7cb36
1 changed files with 1 additions and 3 deletions

View File

@ -6,9 +6,7 @@ After=network.target
[Service]
EnvironmentFile=-/etc/default/telegraf
User=telegraf
Environment='STDOUT=/var/log/telegraf/telegraf.log'
Environment='STDERR=/var/log/telegraf/telegraf.log'
ExecStart=/bin/sh -c "exec /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d ${TELEGRAF_OPTS} >>${STDOUT} 2>>${STDERR}"
ExecStart=/usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d ${TELEGRAF_OPTS}
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
KillMode=control-group