logstash-output-jdbc怎么动态生成sql,statement不管怎么写都会报错?
Logstash | 作者 SilenceRain | 发布于2019年11月22日 | 阅读数:2737
jdbc{
driver_jar_path => "D:\elk\logstash-7.4.2\bin\mysql-connector-java-8.0.18.jar"
driver_class => "com.mysql.jdbc.Driver"
connection_string => "jdbc:mysql://127.0.0.1:3306/ddt2?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true"
username => "root"
password => "123456"
statement => ["[@metadata][sql]","[@metadata][value]"]
}
driver_jar_path => "D:\elk\logstash-7.4.2\bin\mysql-connector-java-8.0.18.jar"
driver_class => "com.mysql.jdbc.Driver"
connection_string => "jdbc:mysql://127.0.0.1:3306/ddt2?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true"
username => "root"
password => "123456"
statement => ["[@metadata][sql]","[@metadata][value]"]
}
2 个回复
kingkap
赞同来自:
然后用crontab + sed定时修改配置文件
caizhangwei
赞同来自: