input {
beats {
port => 5555
}
}
output {
if "mglog" in [tags] {
stdout{ codec=>rubydebug{}}
jdbc {
connection_string => "jdbc:mysql://mysql:3306/test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true"
username => "mysql"
password => "3Fc"
driver_jar_path => "/usr/share/logstash/vendor/jar/jdbc/mysql-connector-java-5.1.49.jar"
driver_class => "com.mysql.jdbc.Driver"
statement => ["INSERT INTO interface(executorResult,inParams,apiUrl) VALUES(?,?,?)","executorResult","inParams","apiUrl"]
}
}
beats {
port => 5555
}
}
output {
if "mglog" in [tags] {
stdout{ codec=>rubydebug{}}
jdbc {
connection_string => "jdbc:mysql://mysql:3306/test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true"
username => "mysql"
password => "3Fc"
driver_jar_path => "/usr/share/logstash/vendor/jar/jdbc/mysql-connector-java-5.1.49.jar"
driver_class => "com.mysql.jdbc.Driver"
statement => ["INSERT INTO interface(executorResult,inParams,apiUrl) VALUES(?,?,?)","executorResult","inParams","apiUrl"]
}
}
0 个回复