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.
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.