0

I have a problem configuring logstash. I want to be able to put in input jdbc for mongodb.

My config :

input{
    jdbc{
        jdbc_driver_library => "mongo-java-driver-3.2.2.jar"
        jdbc_driver_class => "com.mongodb.MongoClient"
        jdbc_connection_string => "jdbc:mongodb://localhost:27017"
        jdbc_user => ""
    }
}
output{
    stdout{

    }
}

The problem is :

:error=>"Java::JavaSql::SQLException: No suitable driver found for jdbc:mongodb://localhost:27017/"}

Manfred Radlwimmer
  • 13,257
  • 13
  • 53
  • 62

2 Answers2

2

The MongoDB JDBC Driver setting is not correct. You must specify the name of the driver class, not the client class.

jdbc_driver_class => "mongodb.jdbc.MongoDriver"

Also make sure that the jdbc_driver_library contains the full absolute path to your mongo-java-driver-3.2.2.jar JAR file

Val
  • 207,596
  • 13
  • 358
  • 360
0

More inputs would be good. you must specify the location of the mongo-java-driver-3.2.2.jar in jdbc_driver_library.

please see the following links : Documentation Similar problem

Rabbit
  • 152
  • 2
  • 11