
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″
}
}
