Logstash-input-mongodb update and delete doc


I am using logstash in order to replace mongo-connector, so I need to update and delete docs that were changed in MongoDB.

I set upsert and I also tried to set the action, however it seems that the input is not detected, here is my conf:

input {
 mongodb {
  uri => 'mongodb://localhost:27017/CitrusDB'
  placeholder_db_dir => '/elk/logstash-mongodb/'
  placeholder_db_name => 'test.db'
  collection => 'Numbers'
  batch_size => 5000

  remove_field => [ "mongo_id","@timestamp","_id","host","@version","logdate","log_entry"]

output {
 elasticsearch { 
  hosts => ["localhost:9200"] 
  doc_as_upsert => true
  index => "citrusdb"
  document_type => "numbers"
 stdout { codec => rubydebug }

Logstash 6.3.2
Elastic 6.3.1

Any thoughts?

The MongoDB Input Plugin that you're using is a community-provided plugin that currently appears to be abandonware; it has many open issues, and hasn't seen any changes in more than a year :weary:

1 Like

Is there an option? What would be the best way to use MongoDB, Logstash and Elastic?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.