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!