MongoDB elasticsearch using logstash error

I am trying to connect mongodb to elastic search. I am using Mongodb compass and in that the database is MongoPOC and collection is Json_file. My config file is as below:
MongoDB 4.2.10 Enterprise
Cluster Standalone

input {
mongodb
{
codec=> "json"
uri=> "mongodb://localhost:27017/MongoPOC"
placeholder_db_dir=> 'D:/airbnb/logstash-7.9.2'
placeholder_db_name=> 'airbnb1_sqlite.db'
collection=> 'Json_file'
batch_size=> 1000
}
}
output {
elasticsearch {
index => "mongotest1"
hosts => ["127.0.0.1:9200"]
}
}
Can anyone help me with correct configuration.Thanks in advance.

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