help me please for Import data from mysql to elasticsearch using logstash
my logstash.conf:
input {
jdbc {
jdbc_connection_string => "jdbc:mysql://localhost:3306/angga1"
jdbc_user => "root"
jdbc_password => ""
jdbc_driver_library => "/home/angga/Downloads/mysql-connector-java-5.1.45/mysql-connector-java-5.1.45-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
statement => "SELECT * FROM table2"
}
}
output {
stdout { codec => json_lines }
elasticsearch {
hosts => "localhost"
index => "search1"
document_type => "table2"
}
}
can someone help me?