logstash 报错from ASCII-8BIT to UT

2023-01-01  本文已影响0人  零宽度接合

要把对应的列设置成相应字符集

input {

    stdin {}

    jdbc {

        jdbc_connection_string => "jdbc:seUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull"

        jdbc_user =>

        jdbc_password =>

        jdbc_driver_library => "/usr/local/mysqlDriver/driver/mysql-connector-java-5.1.46.jar"

        jdbc_driver_class => "com.mysql.jdbc.Driver"

        jdbc_paging_enabled => "true"

        jdbc_page_size => "50000"

        jdbc_default_timezone => "Asia/Shanghai"

        statement_filepath => "/usr/local/logstash/sql/oaesProduct.sql"

        schedule => "* * * * *"

        type => "oaes"

        use_column_value => true

        tracking_column => "update_time"

        last_run_metadata_path => "/usr/local/logstash/sql/oalasttime"

        lowercase_column_names => false

        clean_run => true

columns_charset => {

"message"=> "UTF-8"

"name"=> "UTF-8"

"content"=> "UTF-8"

}

    }

}

上一篇下一篇

猜你喜欢

热点阅读