MYSQL DB to fetch data from table and push the same to elastic

Hello All,

I am trying to fetch the data from mysql db table and trying to push the same to elastic. Below is my config file and the error message that I am getting. Kindly review and let me know if there is something wrong with my config file.

Thanks in advance.

Config file:

input{
jdbc{
# mysql jdbc connection string to our backup databse
jdbc_connection_string => "jdbc:mysql://10.10.10.1:3306/Guru"

            # the user we wish to excute our statement as
            jdbc_user => "guru"
            jdbc_password => "guru01"

            # the path to our downloaded jdbc driver
            jdbc_driver_library => "/home/gprasad9/Data/mysqldb/mysql-connector-java-5.1.44/mysql-connector-java-5.1.44-bin.jar "

            # the name of the driver class for mysql
            jdbc_driver_class => "com.mysql.jdbc.Driver"

            # the control statement
            #record_last_run=>true
            #type => "product"
            statement => "SELECT * FROM table_logstash"

}
}

#filter{ }

output
{
elasticsearch {
protocol => http
index => "mysql-test"
hosts => ["localhost:9200"]
}
stdout { codec => jasonlines }

Error Message:

[gprasad9@oc1008401175 logstash-5.6.2]$ tail -f -n90 nohup.out
Sending Logstash's logs to /home/gprasad9/logstash-5.6.2/logs which is now configured via log4j2.properties
[2017-11-28T00:57:44,576][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/home/gprasad9/logstash-5.6.2/modules/fb_apache/configuration"}
[2017-11-28T00:57:44,581][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/home/gprasad9/logstash-5.6.2/modules/netflow/configuration"}
[2017-11-28T00:57:44,880][ERROR][logstash.outputs.elasticsearch] Unknown setting 'protocol' for elasticsearch
[2017-11-28T00:57:44,890][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Something is wrong with your configuration."}

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