I have a warning regarding this env variable DBUS_SESSION_BUS_ADDRESS.
But couldn’t find how to set it in telegraf congif files to be sure that is set when is run as service.
Should it be set here?
/usr/lib/systemd/system/telegraf.service
[Unit]
Description=Telegraf
Documentation=https://github.com/influxdata/telegraf
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
NotifyAccess=all
EnvironmentFile=-/etc/default/telegraf
User=telegraf
ImportCredential=telegraf.*
#ExecStart=/usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d $TELEGRAF_OPTS
ExecStart=/usr/bin/telegraf --config /home/paas/telegraf/telegraf.conf --config-directory /home/paas/telegraf/ $TELEGRAF_OPTS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartForceExitStatus=SIGPIPE
KillMode=mixed
LimitMEMLOCK=8M:8M
PrivateMounts=true
[Install]
WantedBy=multi-user.target
Thanks!