-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow import/export of grok patterns in content packs #1300
Conversation
.add("id", id) | ||
.add("name='", name) | ||
.add("pattern='", pattern) | ||
.add("contentPack", contentPack) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny thing, but we should remove those ='
from name and pattern, as MoreObjects.toStringHelper
will take care of that
There are a couple of issues I found:
|
I don't think that this is necessary now. In order to properly handle those dependencies, we'd need to introduce a (very) special handling for the GrokExtractor and analyze all used patterns recursively (as grok patterns can include other grok patterns) and then export all those required patterns. If people start complaining, we can still implement it, but for now I wouldn't want to put in those extra hours for this PR. |
Another alternative would be to export all grok patterns, but it's also not an optimal solution. Anyway, I think this is good enough and much better than what we had before! LGTM after the last changes |
Allow import/export of grok patterns in content packs
Previously it wasn't possible to export or import grok patterns as part of a content pack. This could lead to broken extractors in inputs.
This PR adds the capabilities to import/export grok patterns in content packs.