logstash 只能同步增加的数据,不能同步更新和删除的数据
按照老师配置mysql.conf,启动后发现可以全部同步mysql表数据,但是之后mysql做更新和删除操作,并没有同步到es,请问是哪里的问题?谢谢回复!
input { jdbc { jdbc_driver_library => "D:\softwares\study\ES\logstash-6.5.3\mysql-connector-java-8.0.18.jar" jdbc_driver_class => "com.mysql.jdbc.Driver" jdbc_connection_string => "jdbc:mysql://localhost:3306/dev?useUnicode=true&serverTimezone=GMT&useSSL=false&characterEncoding=utf8" jdbc_user => "root" jdbc_password => "123abc" schedule => "* * * * *" clean_run => true statement => "select * from user where update_time > :sql_last_value and update_time < now() ORDER BY update_time desc;" } } output { elasticsearch { hosts => ["http://localhost:9200"] index => "eslog" document_id => "%{id}" #index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}" #user => "elastic" #password => "changeme" } }