logstash-plugins / logstash-filter-grok

Grok plugin to parse unstructured (log) data into something structured.
https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html
Apache License 2.0
124 stars 97 forks source link

Incorrect coerce function with duplicate capture keys in Grok patterns #119

Open z0rc opened 7 years ago

z0rc commented 7 years ago

Migrated from https://github.com/elastic/logstash/issues/7383 Created by @micoq


Hello,

I'm not sure if it's the right repository to post this issue since the grok library is included in Logstash.

On any version of Logstash, if you have two or more fields (or named captures) in a grok pattern with the same name and using a coerce function (like "int" or "float"), this function si not applied all the time (even if the function is the same in each field).

Here is the complete issue with a quick fix : https://github.com/jordansissel/ruby-grok/issues/29