Telegraf service is failed to start

Hi, I have installed telegraf 1.26 on my linux machiene. Service is failing to start and getting the below error.
2023-03-28T05:11:04Z I! Loading config file: /etc/telegraf/telegraf.conf
2023-03-28T05:11:04Z E! error loading config file /etc/telegraf/telegraf.conf: line 1: configuration specified the fields [“token” “organization” “bucket” “urls”], but they weren’t used

please help me to resolve this error

Can you share your config file so we can actually help?

thank you for your response @Hipska .

urls = [“http://localhost:8086”]
token = “$INFLUX_TOKEN”
organization = “example-org”
bucket = “example-bucket”

percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
core_tags = false

ignore_fs = [“tmpfs”, “devtmpfs”, “devfs”, “iso9660”, “overlay”, “aufs”, “squashfs”]



Can you please paste the exact config file in code blocks please?

The current pasted config isn’t even valid TOML.

I found the error. telegraf is working now. Thanks

@SahithiP can you please marked this as resolved then!?

And also mention what the issue was maybe?

Not an issue. I missed removing # at the output section

hey am facing issue with the telegraf as my telegraf.conf file is
region = “us-east-1”
bucket = “specyfeedbackbatch”
access_key = “AWS_ACCESS_KEY_ID”
secret_key = “AWS_SECRET_ACCESS_KEY”

files = [“C:\projects\logging_fastapi\logs_generated.*”]
from_beginning = true

and my error is 2024-02-27 17:23:21 2024-02-27T11:53:21Z I! Loading config: /etc/telegraf/telegraf.conf
2024-02-27 17:23:21 2024-02-27T11:53:21Z E! error loading config file /etc/telegraf/telegraf.conf: error parsing data: line 9: invalid TOML syntax

could i get the source of the error.

It is best to start your own thread, rather than commenting on an old issue. The error message says there is an invalid TOML syntax on line 9 of your config. Run your config through a TOML validator and see what is wrong. My guess is your windows path needs to escape the backslashes:

files = [“C:\projects\logging_fastapi\logs_generated.*”]