-
Notifications
You must be signed in to change notification settings - Fork 846
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
add processor "GeoLite2" #277
Comments
Hey @DpoBoceka, seems like a reasonable addition. |
I'm on it. |
Don't worry for now, eventually we can add a |
Do you think this is going to make its way into benthos? Is there any work I can help with? |
Hey @jamesharr, my plan was to adapt the processor from the existing PR into a bloblang method as it'd make it easier to compose but it's taking me a while to get around to it. If you're interested in having a go that'd be awesome, just let me know if I can help. |
Hello Jeffail, I'm struggling to get started with this one. I took a wrong turn somewhere learning the code-base and I think I need to set it down for a little bit and pick it up again. What all do I need to do create a bloblang method? Is there a good example I can base some work off of? In part, it's been a long time since I've written Go, but I also think my lack of Benthos experience probably isn't helping here. Any pointers would be helpful, thanks! |
Hi @Jeffail, So I have a "hello world" bloblang functioning, but not anything super useful at the moment. I'm wondering a few things:
On the API topic, which makes more sense to you?
or how about this API?
|
hey @jamesharr, I would suggest taking a string argument for a file path. The constructor of a bloblang function/method gets called only once when the value is static, so in the case of something like And I think we ought to go with the method approach as it generally looks cleaner when put at the end of a long coersion/coalesce chain:
In my opinion looks cleaner than:
Having said all that, there's a few caveats that ought to be addressed, I'll take care of these myself afterwards just noting here for future reference:
|
Here's my first-pass at getting a https://github.com/Jeffail/benthos/pull/866/files It seems to work so far, but it's missing a lot of polish. A few questions...
Blobl example:
Output (for
|
Sometimes, if we have IP addresses in our messages (especially if we are triaging web-server's logs) we want them to be enriched with geoip database, like this one:
And here is a reader to it:
What do you think, should we expand benthos with such functionality?
But of course, we are able to insert all that data into some cache or sql and utilise processors which we already have, but that would be more of a workaround. Implementing this would mean another point's taken from a logstash.
The text was updated successfully, but these errors were encountered: