Reputation: 172
I have to import mongoDB data into an elastic search, so I used the given conf with logstash:
input{
jdbc{
jdbc_driver_library => "D:/mongodb_unityjdbc_full.jar"
jdbc_driver_class => "mongodb.jdbc.MongoDriver"
jdbc_connection_string => "jdbc:mongodb://10.10.20.125:27017"
jdbc_user => ""
statement => "SELECT * FROM collection_name.documentname"
}
}
output {
elasticsearch {
hosts => 'http://localhost:9200'
index => 'person_data'
document_type => "person_data"
}
stdout { codec => rubydebug }
}
But I receive the following error:
Error: mongodb.jdbc.MongoDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
Upvotes: 5
Views: 682
Reputation: 489
The file path you have used is incorrect . Please use as:
jdbc_driver_library => "D:\mongodb_unityjdbc_full.jar"
Correct the backward slash to forward slash. Hope it works !
Upvotes: 2
Reputation: 5740
The file D:/mongodb_unityjdbc_full.jar
either does not exist or is the wrong file.
In either case: you should download the official file and put it at the specified location. This is the official download URL: http://www.unityjdbc.com/mongojdbc/mongo_jdbc.php
Upvotes: 2