Influx generating invalid configs

I am trying to set up a vSphere connector, but InfluxDB is generating invalid configs that Telegraf is rejecting. I am getting this error:

2025-10-14T13:48:58Z I! Loading config: http://lol.no
2025-10-14T13:48:58Z E! loading config file http://lol.no failed: error parsing data: line 128: invalid TOML syntax

Here is a the part of the config file downloaded directly from Influx:

  ## Optional TLS Config for use on HTTP connections.
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = false
-# Read metrics from one or many vCenters
[[inputs.vsphere]]
  vcenters = [ "https://lol.no" ]
  username = "nothappening@lol.no"
  password = "Password12345"

Line 128 that it’s complaining about is [[inputs.vsphere]]How is this fixable if I have no control over the final file generated that’s seemingly much different than the file that I edit in the setup process to add credentials for vSphere?

Where did you get this from? I don’t think the dash in front of

-# Read metrics from one or many vCenters

is anywhere on our docs, is it?

That’s from the config file that is generated from the ā€œcreate configurationā€ wizard. That dash is there in the ā€œstockā€ file. If that dash is an issue I can regenerate the config using the wizard and remove it since I do see it here on line 1.

So that’s in InfluxDB isn’t it? @suyash do you know anyone who can look at this?

@Ryanhaku please try to remove the dash in front of the hash and check if this fixes the problem!

1 Like

Well, that seems to fix it.

2025-10-16T12:46:16Z I! Loading config: http://lol.no/api/v2/telegrafs/0fa74295a4045000
2025-10-16T12:46:16Z I! Starting Telegraf 1.36.2 brought to you by InfluxData the makers of InfluxDB
2025-10-16T12:46:16Z I! Available plugins: 239 inputs, 9 aggregators, 35 processors, 26 parsers, 65 outputs, 6 secret-stores
2025-10-16T12:46:16Z I! Loaded inputs: vsphere
2025-10-16T12:46:16Z I! Loaded aggregators:
2025-10-16T12:46:16Z I! Loaded processors:
2025-10-16T12:46:16Z I! Loaded secretstores:
2025-10-16T12:46:16Z I! Loaded outputs: influxdb_v2
2025-10-16T12:46:16Z I! Tags enabled: host=ca6efe1a3214
2025-10-16T12:46:16Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:ā€œca6efe1a3214ā€, Flush Interval:10s
2025-10-16T12:46:16Z W! [agent] The default value of ā€˜skip_processors_after_aggregators’ will change to ā€˜true’ with Telegraf v1.40.0! If you need the current default behavior, please explicitly set the option to ā€˜false’!
2025-10-16T12:46:16Z I! [inputs.vsphere] Starting plugin

1 Like

Yes, that is indeed very strange and perhaps a bug that needs to be fixed. @Ryanhaku glad you were able to resolve it manually, mind give me the steps to reproduce the problem so I can file a bug or you can directly do it here: GitHub Ā· Where software is built Thanks!