Parsing a pipe-separated payload

Greetings
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:
val1|val2|val3

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

is it possible with Telegraf?

Thanks in advance

Regards

Hi,

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