Open
Description
I was using the following snippet to parse a customized size postgres logfile:
grok {
match => {
"message" => [
"%{DATESTAMP:timestamp_psql} %{TZ:tz} ...
which worked very well. As it turned out, sometimes postgres is using multiline, so my first shot was:
multiline {
pattern => "^%{DATESTAMP}.*"
what => previous
negate => true
}
which did not work. Looking at the JSON i found:
"timestamp_psql": "15-07-10 09:31:57.030 UTC",
so the leading 20 is discarded. I mean, for most logfiles this should be totally fine, but for me it was very confusing. I guess grok somehow ignores leading and trailing data for pattern matching.
Im now using
multiline {
pattern => "^20%{DATESTAMP}.*"
what => previous
negate => true
}
as multiline filter (it works). but still thats wierd.