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?