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:
parent
8dc42ad9f2
commit
5913f7cb36
|
@ -6,9 +6,7 @@ After=network.target
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/default/telegraf
|
EnvironmentFile=-/etc/default/telegraf
|
||||||
User=telegraf
|
User=telegraf
|
||||||
Environment='STDOUT=/var/log/telegraf/telegraf.log'
|
ExecStart=/usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d ${TELEGRAF_OPTS}
|
||||||
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}"
|
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
KillMode=control-group
|
KillMode=control-group
|
||||||
|
|
Loading…
Reference in New Issue