Apply processors to only one input

Is it possible to create a processor that only applies to one input? I have the following:

[[inputs.ipmi_sensor]]
interval = "30s"
metric_version = 2
timeout = "20s"
use_sudo = true
[[processors.converter]]
  [processors.converter.tags]
    string = ["status_code"]
[[processors.enum]]
  [[processors.enum.mapping]]
    ## Name of the field to map. Globs accepted.
    field = "status_code"
    default = 0
    [processors.enum.mapping.value_mappings]
      ok = 1

This is producing the output that I want from the ipmi_sensor input. However, if I’m not mistaken, this is going to apply the two processors to every input that I have, not just the ipmi_sensor input. And I would like these processors to only apply to the ipmi_sensor input. This is what I have come up with in an attempt to do this:

[[inputs.ipmi_sensor]]
interval = "30s"
metric_version = 2
timeout = "20s"
use_sudo = true
[[inputs.ipmi_sensor.processors]]
  [[inputs.ipmi_sensor.processors.converter]]
    [inputs.ipmi_sensor.processors.converter.tags]
      string = ["status_code"]
  [[inputs.ipmi_sensor.processors.enum]]
    [[inputs.ipmi_sensor.processors.enum.mapping]]
      ## Name of the field to map. Globs accepted.
      field = "status_code"
      default = 0
      [inputs.ipmi_sensor.processors.enum.mapping.value_mappings]
        ok = 1

But this gives me the following error when I restart telegraf on the node:

E! error loading config file /etc/telegraf/telegraf.d/ipmi_sensor.conf: plugin inputs.ipmi_sensor: line 1: configuration specified the fields ["processors"], but they weren't used

Can anyone tell me what I am doing wrong?

Thanks!

Hi! You can apply filters to your processor. If you can’t distinguish those ipmi metrics by name, you can always specify some custom, extra tag to the ipmi input and filter based on it.
Hope it helps!

Thank you! I think I have that working. I added a custom tag to all ipmi_sensor metrics and then used tagpass on the processor so it only processes those metrics.

I appreciate the help!