Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upLogstash 1.4.2 grok filter with multiple match statements not working as expected #2108
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
YuvalBenAri
Nov 20, 2014
I did, as mentioned in my code example, with no help
On Thu, Nov 20, 2014 at 4:19 PM, Wiibaa notifications@github.com wrote:
@YuvalBenAri https://github.com/YuvalBenAri did you try with break_on_match
=> false ??—
Reply to this email directly or view it on GitHub
#2108 (comment)
.
YuvalBenAri
commented
Nov 20, 2014
|
I did, as mentioned in my code example, with no help On Thu, Nov 20, 2014 at 4:19 PM, Wiibaa notifications@github.com wrote:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wiibaa
Nov 20, 2014
Contributor
@YuvalBenAri sorry, I read too fast, it seems a long standing issue https://logstash.jira.com/browse/LOGSTASH-703
|
@YuvalBenAri sorry, I read too fast, it seems a long standing issue https://logstash.jira.com/browse/LOGSTASH-703 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
YuvalBenAri
Nov 20, 2014
Thanks. Any idea when is it fixed? I just spent few days banging my head with this :(
YuvalBenAri
commented
Nov 20, 2014
|
Thanks. Any idea when is it fixed? I just spent few days banging my head with this :( |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jordansissel
Nov 20, 2014
Contributor
@YuvalBenAri Pretty sure this bug was fixed recently and will be available in the next release (1.5.0) of logstash.
|
@YuvalBenAri Pretty sure this bug was fixed recently and will be available in the next release (1.5.0) of logstash. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
YuvalBenAri
commented
Nov 20, 2014
|
Thanks |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wiibaa
Nov 20, 2014
Contributor
@YuvalBenAri I confirm that this works in current master but the change in grok are important so it would be difficult (at least for me) to do a hack-fix on 1.4, hoping you can work with your workaround until next release.
On current master with this config
input {
stdin{}
}
filter {
grok {
break_on_match => false
match => [ "message", "%{WORD:word1}" ]
match => [ "message", "%{WORD:word2}" ]
match => [ "message", "%{WORD:word3}" ]
}
}
output {
stdout { codec => rubydebug }
}
I get
{
"message" => "hello\r",
"@Version" => "1",
"@timestamp" => "2014-11-20T19:07:51.629Z",
"host" => "LU5CB147157W",
"word1" => "hello",
"word2" => "hello",
"word3" => "hello"
}
|
@YuvalBenAri I confirm that this works in current master but the change in grok are important so it would be difficult (at least for me) to do a hack-fix on 1.4, hoping you can work with your workaround until next release. On current master with this config
I get |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@YuvalBenAri this was fixed in #1558 |
suyograo
closed this
Nov 25, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tabs11
May 29, 2017
Hi, It's possible to have two different logfiles (in my case logs with different number of columns) and create different matchs to each one inside the same grok?
How can I assume the match to respective file or to respective path where is stored?
tabs11
commented
May 29, 2017
|
Hi, It's possible to have two different logfiles (in my case logs with different number of columns) and create different matchs to each one inside the same grok? How can I assume the match to respective file or to respective path where is stored? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
untergeek
May 29, 2017
Member
@tabs11 Please ask usage questions in our discussion forums at https://discuss.elastic.co.
|
@tabs11 Please ask usage questions in our discussion forums at https://discuss.elastic.co. |
YuvalBenAri commentedNov 20, 2014
I tried to use a grok filter with multiple match statements to match various possible formats of a certain log file. The synatax I used was:
However only the first match is working. If I change the order so regex2 is the first one only it works
The workaround I found is:
I have seen other complaints about the same issue but no confirmation that it's still a known issue on 1.4.2