Open cheshar opened 1 month ago
This is a problem with downstream library https://github.com/influxdata/toml which had last change 6 years ago. Probably it was written with respect to TOML v0.4.0 (Published on 2/12/2015) it seems that single quoted keys were introduced in version TOML v0.5.0 (Published on 7/10/2018).
@bazko1 Is there a plan to fix this? I'm generating the telegraf config using the go-toml/v2 https://github.com/pelletier/go-toml package and it uses single quotes as default around the keys (as well as values). But telegraf doesn't like it so I've to resort to replacing all the single quotes to double as a workaround for now.
Well I don't know of any plan as I am not telegraf maintainer myself. Assessment would be required how difficult is it to replace current one with some never lib like go-toml and if licenses are compatible, but go-toml is MIT so it should be fine.
@cheshar and @bazko1 we do have plans to revamp config parsing but currently we don't have the resources as this will touch essential parts of Telegraf...
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.32.0 (git: HEAD@dcfadf8b)
Docker
No response
Steps to reproduce
Expected behavior
Telegraf should start without any error
Actual behavior
Telegraf throws invalid TOML config as error
Additional info
I've sample telegraf configuration that I'm using to start telegraf. Even though the configuration is a valid toml document, the telegraf doesn't seem to like it and keep complaining about the quotes around the table keys. I couldn't find any documentation around not being allowed to use quotes around the table keys. Is this a bug?