Replace special characters in csv header

I have a csv file with a header row which contains the special characters "[" and "]" in few of the column names. Logstash issues the exception "#<RuntimeError: Invalid FieldReference:" while attempting to parse it. Is there anyway to overcome this through logstash?

Any help would be much appreciated!

I was able to resolve this with the mutate - gsub filter.
In my first attempt, I placed the mutate filter after the csv filter and it did not work.
I changed the order now and it works like a charm!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.