是我语句有问题吗。。。
input { jdbc { jdbc_driver_library => "D:\\elasticsearch-7.6.2\\logstash-7.6.2\\mysql-connector-java-5.1.6.jar" jdbc_driver_class => "com.mysql.jdbc.Driver" jdbc_connection_string => "jdbc:mysql://localhost:3306/childrenmanagement?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC" jdbc_user => "root" jdbc_password => "123456" schedule => "* * * * *" clean_run => true # statement => "select * from log where timestamp >date_add(:sql_last_value,INTERVAL 8 HOUR)" #last_run_metadata_path => "D:\\elasticsearch-7.6.2\\logstash-7.6.2\\config\\logstash_metadata" statement =>"select * FROM log WHERE update_time > :sql_last_value AND update_time < NOW() ORDER BY update_time desc" }}output { elasticsearch { hosts => ["http://localhost:9200"] index => "log" document_id => "%{id}" }}
看看你的表有没有update_time这个字段