我有点怀疑你在刷屏

logstash6.6 input-jdbc 启动报错

Logstash | 作者 berace | 发布于2020年02月25日 | 阅读数:2258

Could not fetch the configuration to converge, will retry {:message=>"The following config files contains non-ascii characters but are not UTF-8 encoded [\"/data/logstash/config/mysql-connector-java-5.1.48.jar\"]", :retrying_in=>3.0}
已邀请:

shuchen

赞同来自:

给你一个参考,derby和mysql都是可以的
#JDBC输入
input {
jdbc {
jdbc_driver_library => "/root/logstash-7.4.2/logstash-core/lib/jars/derby-10.14.1.0.jar"
#jdbc_driver_class => "com.mysql.jdbc.Driver"
#jdbc_connection_string => "jdbc:mysql://192.168.0.110:3306/mysql"
jdbc_driver_class => "org.apache.derby.jdbc.ClientDriver"
jdbc_connection_string => "jdbc:derby://192.168.0.110:1527/./db/loganalysis;create=true;usr=root;password=root;"
jdbc_user => root
jdbc_password => root
#启用追踪,如果为true,则需要指定tracking_column
use_column_value => true
#指定追踪的字段,
tracking_column => "update_time"
#追踪字段的类型,目前只有数字(numeric)和时间类型(timestamp),默认是数字类型mysql-connector-java-8.0.17.jar,derbyclient.jar,derby-10.14.1.0.jar
tracking_column_type => "timestamp"
#记录最后一次运行的结果
record_last_run => true
#上面运行结果的保存位置
last_run_metadata_path => "jdbc-position.txt"
statement => "SELECT * FROM loganalysis.log_server_info where update_time >:sql_last_value"
#statement => "SELECT * FROM loganalysis.log_server_info where 1=1"
schedule => "* * * * *"
}
#stdin {}
}

要回复问题请先登录注册