logstash-plugins / logstash-output-mongodb

Apache License 2.0
36 stars 77 forks source link

Logstash sync from Oracle to MongoDB (updating records) #26

Open srinvas opened 8 years ago

srinvas commented 8 years ago

We are using an pipeline file to sync data from oracle to mongo to perfom an update operation. When logstash is pushing data to mongo we want logstash to do an db.collection.save() instead of db.collection.insert() as this an update operation the records should get updated instead of getting inserted newly.

Logstash by default is using db.collection().insert and pushing all the records. So this is causing an issue when "_id"(which is unique for an single doc) is same for two records mongo doesn't allow logstash to insert the record.

So is there any option available in output mongo plugin of logstash to prevent this issue.

suyograo commented 8 years ago

@srinvas we'll gladly accept a PR for this change.

srinvas commented 8 years ago

@suyograo when can we expect this change to be added to the output plugin.

colinsurprenant commented 5 years ago

relates to #54