logstash-plugins / logstash-input-gelf

Apache License 2.0
20 stars 39 forks source link

Doesn't properly handle non-ASCII UTF-8 characters in GELF input #54

Open mikaelstaldal opened 7 years ago

mikaelstaldal commented 7 years ago

When sending in the above GELF message (compressed with ZLIB, over UDP) to Logstash (using Log4j 2.8.2), the non-ASCII characters in short_message gets garbled. It ends up like this in ElasticSearch:

 {
          "source_host": "127.0.0.1",
          "level": 6,
          "logger": "HelloWorld",
          "foo": "FOO",
          "thread": "main",
          "message": "Hello, world! åäö 1",
          "version": "1.1",
          "bar": "BAR",
          "@timestamp": "2017-04-28T10:28:06.263Z",
          "host": "udp-zlib",
          "@version": "1",
          "additionalField1": "constant value",
          "additionalField2": "foo bar"       
}

It seems that Logstash GELF input doesn't decode the GELF message with UTF-8 as it should according to GELF spec.