Permission denied on restarting telegraf

Running (Telegraf 1.1.0) on a RHEL 7.0 machine, I am getting a permission denied error when restarting telegraf:

â telegraf.service - The plugin-driven server agent for reporting metrics into InfluxDB
   Loaded: loaded (/usr/lib/systemd/system/telegraf.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2017-05-15 14:19:12 GST; 7min ago
     Docs: https://github.com/influxdata/telegraf
 Main PID: 12779 (telegraf)
   CGroup: /system.slice/telegraf.service
           ââ12779 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d

May 15 14:19:12 myhost systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
May 15 14:19:12 myhost systemd[1]: Starting The plugin-driven server agent for reporting metrics into InfluxDB...
May 15 14:19:12 myhost telegraf[12779]: 2017/05/15 14:19:12 E! Unable to create /etc/telegraf/telegraf_error.log (open /etc/telegraf/telegraf_error.log: permission denied), using stderr

I only changed logging option in configuration file to quiet = true.
Seems like the file /etc/telegraf/telegraf_error.log cannot be created because of permission issue.

Note that I am running the service as root, and telegraf user is already added to the group telegraf.

Any ideas?

thanks

What is your logfile set to under the agent section? It should normally be: logfile = "".

@daniel it’s the same file mentioned in the error: logfile = "/etc/telegraf/telegraf_error.log"

Change it to logfile = "", since you are using systemd you will want it to handle logging.