Telegraf - Converter Processor - conver all except


I’m ingesting a series of not-so-nice data with telegraf, the use case is not the best one for the tool but that’s it.

Every gathered row has 2 mandatory (and known) columns, the rest of the data “may vary”, some of those high variable data will arrive serialized as tags.

What I need to do is to keep only 2 columns as tags, and convert all the others to string fields.

I came up with the following config, but I was wondering if there is a better solution to achieve a conver all except

  1. Turn all tags into string fields
  2. Turn the “known keys” back from field to tag
  order = 1
  namepass = ['MyWeirdMeasurement']
    string = ["*"]

  order = 2
  namepass = ['MyWeirdMeasurement']
    tag = ['MandatoryCol1','MandatoryCol2']

Do you guys have different ideas about how to achieve this?