标签:root mysql doc input mtab ble 技术 output inpu
input{
jdbc{
jdbc_driver_library=>"/Users/logstash/mysql-connector-java-5.1.39-bin.jar"
jdbc_driver_class=>"com.mysql.jdbc.Driver"
jdbc_connection_string=>"jdbc:mysql://localhost:3306/database_name"
jdbc_user=>"root"
jdbc_password=>"password"
schedule=>"*****"
statement=>"select*fromtable1"
type=>"table1"
}
jdbc{
jdbc_driver_library=>"/Users/logstash/mysql-connector-java-5.1.39-bin.jar"
jdbc_driver_class=>"com.mysql.jdbc.Driver"
jdbc_connection_string=>"jdbc:mysql://localhost:3306/database_name"
jdbc_user=>"root"
jdbc_password=>"password"
schedule=>"*****"
statement=>"select*fromtable2"
type=>"table2"
}
#addmorejdbcinputstosuityourneeds
}
output{
elasticsearch{
index=>"testdb"
document_type=>"%{type}"#<-usethetypefromeachinput
hosts=>"localhost:9200"
}
}
[es同步到数据库数据]同步mysql数据到ElasticSearch的最佳实践
标签:root mysql doc input mtab ble 技术 output inpu
原文地址:https://www.cnblogs.com/sqlserver-mysql/p/12714881.html