0

I have logstash in reading log files which is actually text document. I have come across with BOM (Byte of Mark) problem at the very first line of records. How can I get rid of it?

Thanks.

Kennedy Kan
  • 273
  • 1
  • 7
  • 20
  • 1
    Could you add more details? What is exactly the problem (in term of expected vs real result)? Configuration and example input & output is also welcome. – baudsp Jul 08 '16 at 11:31
  • http://stackoverflow.com/a/39699978/229949 seems to be the answer – the_joric Jan 18 '17 at 14:44

1 Answers1

1

Until logstash-input-file would trim BOM mark by itself (which it does not do as of v4.1.10), you could add mutate filter to remove it.

filter {
    mutate {
        # Trim BOM mark
        gsub => [
            "message", "^\xEF\xBB\xBF", ""
        ]
    }
}
Pavel Zubkou
  • 825
  • 9
  • 13