Remove special characters in a filed value

In my logstash filter, I received following filed and its value.. In order to remove duplicate filed value, first I need to remove special characters in that filed value.

For given sample the field name "log_name" listed two results and they are duplicated values, but followed with special characters. "Authentication," and "Authentication;"

So Need a help to remove special characters in the filed value (, and ; ) -> comma and colon

"log_name" => [
    [0] "Authentication,",
    [1] "Authentication;"
],

Use a mutate filter and its gsub option to replace commas and colons with an empty string.

How you deleted duplicated data after removing special characters?

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