-
Notifications
You must be signed in to change notification settings - Fork 77
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
Mongo plugin with actions #76
Open
arichiardi
wants to merge
10
commits into
logstash-plugins:main
Choose a base branch
from
elasticpath:mongo-actions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
❌ Author of the following commits did not sign a Contributor Agreement: Please, read and sign the above mentioned agreement if you want to contribute to this project |
…lugins#65 and logstash-plugins#66 Makes plugin work with mongodb driver, version 2.6 (again)
in addition to inserting new ones
fixing mongo driver version to 2.6
probably doesn't make sense in most use cases and causes trouble if size or order of array elements changes
This commit introduces :filter (instead of :query-key and :query-value) for defining the query that we pass down to Mongo. It is a hash and will allow us to filter by a composite key. In addition to that :update_expressions is now another optional hash that can be added to *replace* the default $set operator. The hash is a set of Mongo Update Expressions (https://docs.mongodb.com/manual/reference/operator/update/#id1) and the values are also substituted. Note that pipeline (Mongo >= 4.2) support is not there yet. Finally, action is now fully dynamic and expanded via sprintf as in logstash-output-elasticsearch.
arichiardi
force-pushed
the
mongo-actions
branch
3 times, most recently
from
October 16, 2020 20:56
1d5ee93
to
8a04990
Compare
This option makes possible to set a maximum number the plugin will retry writes for. It defaults to retry forever (negative max_retries) to keep backward compatibility.
This option makes possible to set a maximum number the plugin will retry writes for. It defaults to retry forever (negative max_retries) to keep backward compatibility.
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 there!
My company uses
logstash-output-mongodb
for building up projections from events and we needed some more fine grained functionality that would allow us to specify the kind of query we send to mongo (of particular importance was sendingupdate-one
including$inc
.I have been piggiebacking on the work done by @nik9000 in #74 and introduced a bit more to it. The two branches can definitely be merged and I welcome any improvement and willing to maintain it.
In particular my commit introduces, along with
:action
, an explicit:filter
for defining the query that we pass down to Mongo. It is a hash and will allow us to filter by a composite key.In addition to that
:update_expressions
is now another optional hash that can be added to replace the default$set
operator.Finally, action is now fully dynamic and expanded via
event.sprintf
as inlogstash-output-elasticsearch
.Is there any interest in merging?