Open jsvd opened 8 years ago
how to reproduce:
input {
generator { count => 1 message => "<14>2015-02-11T17:49:29Z logspout dev_ziservice_1[1]: ASDF"}
generator { count => 1 message => "<14>2015-02-11T17:49:29Z logspout dev_ziservice_1[1]: "}
generator { count => 1 message => "<14>2015-02-11T17:49:29Z logspout dev_ziservice_1[1]:"}
}
filter {
grok {
match => ["message", "<%{NUMBER}>%{TIMESTAMP_ISO8601:syslogTimestamp} %{SYSLOGHOST} %{DATA:container_name}(?:\[%{POSINT}\])?:%{SPACE}?%{GREEDYDATA:message}"]
overwrite => [ "message" ]
}
}
output {
stdout { codec => rubydebug }
}
you need to use keep_empty_captures => true
see stackoverflow
migrates from https://github.com/elastic/logstash/issues/2590