Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update toml library used for improved configuration ingestion #5513

Merged
merged 11 commits into from
Apr 26, 2019

Conversation

glinton
Copy link
Contributor

@glinton glinton commented Mar 1, 2019

Adds support for:

Caveats/outstanding issues:

  • comments in within arrays are still not supported (3642). This fails:
  methods = [
    # comment
    "POST"
  ]
  • illogical table boundaries (3444). This breaks:
[[outputs.http]]
    method = "POST"
    data_format = "json"
    url = "http://localhost"
    [outputs.http.headers]
       Authorization = "Token $TOKEN"
       Content-Type = "application/json"
    namepass = ["storage_usage_bytes"]
    taginclude = ["org_id"]

use inline tables:

[[outputs.http]]
    method = "POST"
    data_format = "json"
    url = "http://localhost:1234/"
    headers = { Authorization = "Token $TOKEN",Content-Type = "application/json"}
    namepass = ["storage_usage_bytes"]
    taginclude = ["org_id"]

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

internal/config/config_test.go Show resolved Hide resolved
internal/config/config_test.go Outdated Show resolved Hide resolved
internal/config/config_test.go Show resolved Hide resolved
internal/config/config_test.go Outdated Show resolved Hide resolved
internal/config/testdata/inline_table.toml Show resolved Hide resolved
plugins/inputs/jolokia2/jolokia_test.go Outdated Show resolved Hide resolved
Gopkg.lock Outdated Show resolved Hide resolved
@glinton glinton added this to the 1.11.0 milestone Mar 28, 2019
internal/config/config_test.go Outdated Show resolved Hide resolved
Gopkg.lock Outdated Show resolved Hide resolved
@danielnelson danielnelson merged commit 32f0cb1 into master Apr 26, 2019
@danielnelson danielnelson deleted the naoina/toml branch April 26, 2019 03:20
hwaastad pushed a commit to hwaastad/telegraf that referenced this pull request Jun 13, 2019
bitcharmer pushed a commit to bitcharmer/telegraf that referenced this pull request Oct 18, 2019
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[[inputs.http]] error table `headers' is in conflict Use BurntSushi/toml for config file parsing
2 participants