logstash 数据采集时间差8小时问题及解决

只要在input中增加   jdbc_default_timezone =>"Asia/Shanghai" 


input {
  jdbc {
    jdbc_driver_library => "/root/logstash-6.7.1/myconfig/mysql-connector-java-5.1.46.jar"
    jdbc_driver_class => "com.mysql.jdbc.Driver"   
    jdbc_connection_string => "jdbc:mysql://url"
    jdbc_user => "root"
    jdbc_password => "123456"
    schedule => "* * * * * *"
    jdbc_page_size => "50000"
    use_column_value => false
    tracking_column => "update_date"
    statement => "SELECT  * FROM t_meise_resource where update_date > :sql_last_value "
    jdbc_default_timezone =>"Asia/Shanghai" 

  }

你可能感兴趣的:(docker,logstash)