-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ingest Node's grok can't set the same field from two patterns #22117
Comments
@talevy any thoughts? |
I'll take a look at this |
Grok was originally ignoring potential matches to named-capture groups larger than one. For example, If you had two patterns containing the same named field, but only the second pattern matched, it would fail to pick this up. This PR fixes this by exploring all potential places where a named-capture was used and chooses the first one that matched. Fixes elastic#22117.
…2131) Grok was originally ignoring potential matches to named-capture groups larger than one. For example, If you had two patterns containing the same named field, but only the second pattern matched, it would fail to pick this up. This PR fixes this by exploring all potential places where a named-capture was used and chooses the first one that matched. Fixes #22117.
…2131) Grok was originally ignoring potential matches to named-capture groups larger than one. For example, If you had two patterns containing the same named field, but only the second pattern matched, it would fail to pick this up. This PR fixes this by exploring all potential places where a named-capture was used and chooses the first one that matched. Fixes #22117.
i want use grok processor in elasticsearch to parse some message, which have double quotes in text, like this
but has error belows:
I think the reason is the " (double quotation) cannot support in grok processor patterns,can someone help me resolve this issues? |
Hi @y0299! Indeed you need to escape the the offending lines are
and
both should escape the like so:
and
Hope that helps! For the future, it is best to ask for this type of help on The Elastic Discuss Forum since you may even find your questions were already answered there! |
hi, @talevy ,thanks for giving me advice!
there still has error occurs, like below:
do i must change the log to |
you forgot the offending this should work:
|
en, this way can work, but i must change the original log |
@y0299 I'm not sure I completely understand |
Elasticsearch version: 5.0.1
Plugins installed: ingest-node-geoip, ingest-node-ua
JVM version: 1.8
OS version: macOS sierra
Description of the problem including expected versus actual behavior:
See the following Ingest node simulate API call:
There are two Grok patterns, and the provided doc should match the second one. This works fine, but the
mysql.error.message
is not created. If I rename it tomysql.error.message1
in either of the two grok patterns, it works.A workaround I found is to define another grok pattern definition for GREEDYDATA, like this:
The text was updated successfully, but these errors were encountered: