Logstash[2.4.0] JDBC input plugin not working

Hi all,
https://www.elastic.co/blog/logstash-jdbc-input-plugin
Am new to logstash, not able to inject the data into elasticsearch from logstash.
Elastic was up and running in the port number 9200. Ex: 172.16.0.19:9200
Downloaded logstash as tar.
Version Details
ElasticSearch - 2.4.1
Logstash - 2.4.0
Installed JDBC Input plugin
[logstash]$ bin/logstash-plugin install logstash-input-jdbc
Command used for importing data into ES.
[logstash]$ bin/logstash --debug -l /home/user/logstash.log -f /home/user/logstash.txt

logstash.txt

input {
jdbc {
       jdbc_connection_string => "jdbc:mysql://172.17.3.9:3306/test"
       jdbc_user => "root"
       jdbc_password => "root"
       jdbc_validate_connection => true
       jdbc_driver_library => "/home/user/mysql-connector-java-5.1.36.jar"
       jdbc_driver_class => "com.mysql.jdbc.Driver"
       statement => "SELECT * FROM test.test"
     }
}
output {
    elasticsearch{
        protocol => http
        index => "default__product"
        document_type => "test"
        document_id => "%{id}"
        hosts => ["172.16.0.19:9200"]
    }
}

logstash.log

Link for Log file

This is what your log says:

Unknown setting 'protocol' for elasticsearch

Remove that setting.

It works thanks :slight_smile:
Breaking my head for whole day!!!!!!!!

Working Config File

input {
jdbc {
       jdbc_connection_string => "jdbc:mysql://172.17.3.9:3306/test"
       jdbc_user => "root"
       jdbc_password => "root"
       jdbc_validate_connection => true
       jdbc_driver_library => "/home/user/mysql-connector-java-5.1.36.jar"
       jdbc_driver_class => "com.mysql.jdbc.Driver"
       statement => "SELECT * FROM test.test"
     }
}
output {
    elasticsearch{
        index => "default__product"
        document_type => "test"
        document_id => "%{id}"
        hosts => ["172.16.0.19:9200"]
    }
}

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