Parsing a pipe-separated payload

I’m completely new to Telegraf.
I’m trying to parse a payload which is a serie of strings (some may contain commas and semicolons) separated by the pipe character (“|”).

For example:

the order is fixed. One is a “value” (to be used for sums), others are “tags”.

is it possible with Telegraf?

Thanks in advance



Check out the CSV parser, specifically changing the csv_delimiter = "," option to use the |. Then you can set up the other configuration settings to specify what columns are fields or tags.

1 Like