I have installed telegraf under raspberry pi and I am trying to start telegraf service but it fails with the following error:
error loading config file /etc/telegraf/telegraf.conf: line 1: configuration specified the fields ["database" "password" "urls" "username"], but they weren't used
More details:
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $ sudo apt install telegraf
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
telegraf is already the newest version (1.28.1-1).
0 upgraded, 0 newly installed, 0 to remove and 105 not upgraded.
pi@raspberrypi:~ $ /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d $TELEGRAF_OPTS
2023-09-20T14:46:16Z I! Loading config: /etc/telegraf/telegraf.conf
2023-09-20T14:46:16Z E! error loading config file /etc/telegraf/telegraf.conf: line 1: configuration specified the fields ["database" "password" "urls" "username"], but they weren't used
pi@raspberrypi:~ $ sudo systemctl start telegraf.service
Job for telegraf.service failed because the control process exited with error code.
See "systemctl status telegraf.service" and "journalctl -xe" for details.
Tried to follow this tutorial: Monitoring Raspberry Pi System using InfluxDB, Telegraf and Grafana
Do you have anything to suggest? Is there any better tutorial?
Attaching also the .conf file. Lines 1355~1361
https://gist.github.com/gziras/7d8639e11286471822a04c89ad41f14b