JDBC input plugin error for MongoDB

Hello,
I am using Logstash to replcate a database from MongoDB to Elasticsearch using Logstash 6.0.0, here is my config file:

input{
    jdbc{
        jdbc_driver_library => "/usr/share/logstash/driver/mongodb-driver-3.6.1.jar"
        jdbc_driver_class => "mongodb.jdbc.MongoDriver"
        jdbc_connection_string => "jdbc:mongodb://mongo:27017/DevDb"
        jdbc_user => ""
        statement => "*"
    }
}

output {
  elasticsearch {
    hosts => 'http://user:xxxx@elasticsearch:9200'
    index => 'mongo'
 }
  stdout { codec => rubydebug }
}

I am using the official MongoDB java driver, downloaded from this link: Mongo java driver, but I'm getting the following error:

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

So what class name should I use ? Thanks in advance for your help!

This driver mongodb-driver-3.6.1.jar is a Java not JDBC driver.

Maybe:
Progress or UnityJDBC, you may need to pay for these.

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