-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
User-defined lookup enrichment #5221
Comments
|
|
@ph you're right, it could be and we should consider it when implementing. |
@acchen97 I love the idea of enhanced lookups for logstash pipeline, what about pushing priority on redis lookup, specially when the lookup is dynamic, having lookup with both ES and Redis might be very helpful to enhance events at runtime. Specially when there are two flows that have connections somehow. |
@ph also could be detected by the parser, filename might be tricky but I agree usually a |
+1 |
@vnadgir-ef file lookups are already supported by the |
I've created a plugin that does a lot of what's requested here. I call the plugin logstash-filter-augment. It allows joining multiple fields from a CSV/JSON/YAML file onto an event. I based it initially on the translate filter. The gem is published to ruby-gems: https://rubygems.org/gems/logstash-filter-augment I'd appreciate any feedback/bug fixes/enhancement requests. |
@acchen97 can you update the description of this ticket (or close it and open a new one) to reflect some of the recent work in this area? I remember us having some discussions on slack/zoom about features we've already got implemented in the translate filter, for example. |
@jordansissel updated this based on our most recent discussions. Let me know if I missed anything. |
It would be nice to allow not only the elasticsearch _search endpoint, but also the _analyze endpoint as well. |
I use the Translate filter heavily and the Ruby filter also for the same reasons so this is a very welcome addition. In one case I am using the Translate filter to lookup certain values and if nothing matches I have the ruby filter execute a Go program that queries a HTTP api, returns the result and appends the results to the translate dictionary. The issue is that if there are for example 100 incoming messages with the same value that does not exist in the dictionary the HTTP api will be hit 100 times, if there would be some way to trigger a reload of the dictionary if the file changes then that would be extremely valuable. Just instead of having a reload the file every X seconds have it watch the file for modifications and if it is changed reload it. To prevent constant reloads if the dictionary changes fast then have a setting to to wait at least X seconds before reloading it again. |
@jordansissel @suyograo just updated this based on our recent discussions with specific action items for translate, elasticsearch, and jdbc filters. One thing we should discuss is the design for better integrating the ES filter with ES percolations. |
Any news here or other issues to follow up the work? |
Is this still a planned feature? |
Database lookup enrichment is now generally available with the JDBC static and JDBC streaming filters. |
Logstash should have more dynamic ways to lookup and enrich events, especially with external user-defined datasets. Currently, the main venue of lookup enrichment comes from the translate filter, which is primarily basic key/value lookup and only supports YAML. Here's some ideas:
Use cases
Filter plugin additions and enhancements for user-defined data lookup
Ignore below, retaining for precedence
Lookup source file formats (for file/http)
The lookup data should be cached:
Multi-field lookup
CSV Format
Example
Simple key/value lookup
JSON Format
YAML Format
Example
HTTP example
Very similar to file counterpart, except 'url' instead of 'path'.
Ref: #5087, #3633, #3446, #4510
P.S. - open to suggestions on new plugin names...~~
The text was updated successfully, but these errors were encountered: