logstash multiline logging with docker gelf driver

I’m trying to force logstash to not split my mulitiline logs, i’m testing it with such simple config:

input {
  gelf {
    port => 5055
}
filter {
  multiline {
    pattern => "^\s"
    what => previous
  }
}
output {
  stdout {
  }
}

But im getting still such error (i was trying to put it to gelf codec options too but result was that same):

Sending Logstash’s logs to /var/log/logstash which is now configured
via log4j2.properties [2017-04-26T14:11:24,422][ERROR][logstash.agent
] Cannot load an invalid configuration {:reason=>”Expected one of #,
=> at line 6, column 13 (byte 58) after input {\n gelf {\n port => 5055\n}\nfilter {\n multiline “}

Answer

The error message indicates that the configuration is invalid. According to this table a host is required:

gelf {
    host => ...
}

Attribution
Source : Link , Question Author : user3069488 , Answer Author : 030

Leave a Comment