Issues with tags when using multiple jolokia2 input plugins

#1

We are running java components on the same server and have two conf files that uses jolokia2 input plugin. In first config, we use a tag named component = “a” and on the second, we use component = “b” and when telegraf test is invoked on the config files separately, you get data with different tags, but when restarting telegraf, both the data is being sent with tag component = a. Why is this happening?
First Config
[[inputs.jolokia2_agent]]
urls = [“http://127.0.0.1:6004/jolokia”]
name_override = "component-a

[tags]
env = “dev”
component = “a”

Second Config

[[inputs.jolokia2_agent]]
urls = [“http://127.0.0.1:6005/jolokia”]
name_override = "component-b

[tags]
env = “dev”
component = “b”

#2

You should fully qualify the tags table like so:

[[inputs.jolokia2_agent]]
  urls = ["http://127.0.0.1:6004/jolokia"]
  name_override = "component-a"

  [inputs.jolokia2_agent.tags]
    env = "dev"
    component = "a"