Open
Conversation
Contributor
|
Thanks for the PR! I'll take a look at this on Monday :) |
Contributor
|
I haven't looked at the code, but your example has me asking one question -- why would this be preferred over having a papertrail input? (Other examples of HTTP-using inputs: Elasticsearch, Heroku, S3, couchdb_changes, SQS, etc) |
|
@jordansissel i think papertail is just an example for any HTTP input. @andrewvc , whats the status of this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, I've been working on the idea of dynamic parameters related to #51. The config could be extended as follows:
This means that
min_idparameter of query will be populated withmax_idfield from the parsed event. I've never written Ruby code before, but it's quite fun. I know the tests are missing, but if you confirm that this can be potentially merged (seems to be quite popular feature), I will write tests.One of the potential problems is that the request's
specnow becomes populated with some extra variables, such aswhich might not be desirable, but I could not put them in the request object directly because
logstash/plugin_mixins/http_clientexpects only 2 elements.Another issue is that at the moment dynamic parameters are hard-coded to go into
queryproperty (and creating one if it does not exist), and notparamswhich would be required forPOST/ other methods. Also they will override original query parameters specified in the config, but I guess this can be desirable.Some implementation details had been taken almost directly from logstash-jdbc-input.
So yeah, let me know if it's cool and I'll write some tests / make suggested improvements. Cheers!
Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/