Mongo db to elastic 6.4


(Pirai Sudie) #1

How to sync data from MongoDB into elastic using logstash...

There is no offical input plugin then how to solve this....


(Magnus B├Ąck) #2

There's a third-party plugin. Or, perhaps you can use the jdbc input?


(Pirai Sudie) #3

i have used jdbc input and i tried mongo-java-driver-3.4.2.jar and other jars

but still i getting below exeception

mongodb.jdbc.MongoDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?

please help me..

below is my config code:

input{
jdbc{
jdbc_driver_library => "D:/mongo-java-driver-3.4.2.jar"
jdbc_driver_class => "java::mongodb.jdbc.MongoDriver"
jdbc_connection_string => "jdbc:mongodb://localhost:27017/database"
jdbc_user => ""
jdbc_validate_connection => true
statement => "db.Country_collection.find()"
}
}
output {
elasticsearch {
hosts => 'http://localhost:9200'
index => 'person_data'
document_type => "person_data"
}
stdout { codec => rubydebug }
}


(system) #4

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