Changing snmp input with regex using telegraf pulls before influxdb

In case someone stumbles on this thread and is looking for the answer.

Something to note, the plugin portion [[processors.regex]] and [processors.converter]] needs to be at the end of the file, after all of the [[inputs.snmp.field]] parts (if you have multiple)

I had the regex incorrect, which is corrected below.

The namepass portion was also incorrect, corrected below. The namepass should reference the inputs portions, and then the key, references the name of the inputs.snmp

Here was the solution:

[[inputs.snmp.field]]
    name="cpuPercent"
    oid = "HIK-DEVICE-MIB::cpuPercent.0"

[[processors.regex]]
    order = 1
    namepass = ["snmp"]
    [[processors.regex.fields]]
      key = "cpuPercent"
      pattern = "^(\\d+).*"
      replacement = "${1}"

  [[processors.converter]]
    order = 2
    [processors.converter.fields]
      integer = ["cpuPercent"]