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

table `inputs.xxx.tags' is in conflict with normal table in line xx #5021

Closed
xin053 opened this issue Nov 22, 2018 · 1 comment
Closed

table `inputs.xxx.tags' is in conflict with normal table in line xx #5021

xin053 opened this issue Nov 22, 2018 · 1 comment
Labels
area/configuration bug unexpected problem or unintended behavior upstream bug or issues that rely on dependency fixes

Comments

@xin053
Copy link
Contributor

xin053 commented Nov 22, 2018

Relevant telegraf.conf:

System info:

[Include Telegraf version, operating system name, and other relevant details]

  • telegraf version: 1.9.0
  • operating system: win10 1809 && centos 6.9

Steps to reproduce:

[[inputs.cpu]]
  percpu = true
  totalcpu = true
  tags = {project = "test1"}

[[inputs.net_response]]
  protocol = "tcp"
  address = "127.0.0.1:1080"
  timeout = "3s"
  [inputs.net_response.tags]  # line 73
    project = "test2"

[[inputs.net_response]]
  protocol = "tcp"
  address = "127.0.0.1:1081"
  timeout = "3s"
  [inputs.net_response.tags]   # line 80
    project = "test3"
telegraf.exe --config telegraf.conf --test

got error:

E! [telegraf] Error running agent: Error parsing telegraf.conf, toml: line 80: table `inputs.net_response.tags' is in conflict with normal table in line 73

but,

[[inputs.net_response]]
  protocol = "tcp"
  address = "127.0.0.1:1080"
  timeout = "3s"
  [inputs.net_response.tags]
    project = "test1"

[[inputs.net_response]]
  protocol = "tcp"
  address = "127.0.0.1:1081"
  timeout = "3s"
  [inputs.net_response.tags]
    project = "test2"

[[inputs.cpu]]
  percpu = true
  totalcpu = true
  tags = {project = "test1"}

or

[[inputs.cpu]]
  percpu = true
  totalcpu = true
  [inputs.cpu.tags]
    project = "test"

[[inputs.net_response]]
  protocol = "tcp"
  address = "127.0.0.1:1080"
  timeout = "3s"
  [inputs.net_response.tags]
    project = "test1"

[[inputs.net_response]]
  protocol = "tcp"
  address = "127.0.0.1:1081"
  timeout = "3s"
  [inputs.net_response.tags]
    project = "test2"

will work fine.

@glinton
Copy link
Contributor

glinton commented Nov 27, 2018

Thanks for this, I believe the issue is that the toml parsing library we are using has issues with inline tables. Your last example works fine because you define the cpu input's tags as an explicit table.

I'm going to close this in favor of #4098

@glinton glinton closed this as completed Nov 27, 2018
@glinton glinton added bug unexpected problem or unintended behavior upstream bug or issues that rely on dependency fixes area/configuration labels Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration bug unexpected problem or unintended behavior upstream bug or issues that rely on dependency fixes
Projects
None yet
Development

No branches or pull requests

2 participants