I want to insert data from mysql to elasticsearch using logstash.
when I am running command, logstash -f myconf.conf
I am getting following error:
D:\Users\admin\setups\logstash-2.1.1\bin>logstash -f myconf.conf
io/console not supported; tty will not be manipulated
Settings: Default filter workers: 2
Error: com.jdbc.mysql.Driver not loaded. Are you sure you've included the correc
t jdbc driver in :jdbc_driver_library?
You may be interested in the '--configtest' flag which you can
use to validate logstash's configuration before you choose
to restart a running system.
I am using following conf settings...
input {
jdbc {
jdbc_driver_library => "D:/mysql-connector-java-5.1.37-bin.jar"
jdbc_driver_class => "com.jdbc.mysql.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/testdatabase"
jdbc_user => "root"
jdbc_password => "root"
schedule => "5"
statement => "SELECT * from testtable"
}
}
output {
elasticsearch {
hosts => "localhost"
action => "index"
index => "testindex"
}
stdout { codec => rubydebug }
}
My java version is
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
I am using MySQL Server version: 5.7.9
And I've placed my jar in d: [ d-drive ]
I've spent enough time on this, and referred google for this, but didn't get solution.
Is there any PATH setting is required for loading library?
Suggest necessary solution.