文件内容(使用jdbc倒入数据库的数据到es) input { jdbc { # mysql jdbc connection string to our jdbc_connection_string => "jdbc:mysql://192.168.5.185:3306/test?characterEncoding=UTF8" # the user we wish to excute our statement as jdbc_user => "root" jdbc_password => "root" # the path to our downloaded jdbc driver jdbc_driver_library => "D:/logstash‐5.6.8/mysqletc/mysql‐connector‐java‐5.1.46.jar" # the name of the driver class for mysql jdbc_driver_class => "com.mysql.jdbc.Driver" jdbc_paging_enabled => "true" jdbc_page_size => "50000" # 以下对应着要执行的sql的绝对路径。 statement => "SELECT id,name,price,image,weight,category_name,brand_name,spec FROM tb_sku" # 定时字段 各字段含义(由左至右)分、时、天、月、年,全部为*默认含义为 每分钟都更新 schedule => "* * * * *" } }