jackandrose6
2019-11-13 17:46
老师,能提供logstash的mysql.cnf和mysql里的测试数据吗?
我的数据库数据没进来
input{
jdbc{
jdbc_driver_library => "/Volumes/Data/logstash-6.3.2/mysql-connector-java-5.1.37.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://127.0.0.1:3306/blog"
jdbc_user => "root"
jdbc_password => "123456"
schedule => "* * * * *"
clean_run => true
statement => "select * FROM t_blog WHERE update_time > :sql_last_value AND update_time < NOW() ORDER BY update_time desc"
}
}
output {
elasticsearch{
hosts => ["127.0.0.1:9200"]
index => "blog"
document_id => "%{id}"
}
}
input{ jdbc{ jdbc_driver_library => "/Volumes/Data/logstash-6.3.2/mysql-connector-java-5.1.37.jar" jdbc_driver_class => "com.mysql.jdbc.Driver" jdbc_connection_string => "jdbc:mysql://127.0.0.1:3306/blog" jdbc_user => "root" jdbc_password => "123456" schedule => "* * * * *" clean_run => true statement => "select * FROM t_blog WHERE update_time > :sql_last_value AND update_time < NOW() ORDER BY update_time desc" }}output { elasticsearch{ hosts => ["127.0.0.1:9200"] index => "blog" document_id => "%{id}" }}
Springboot + ElasticSearch 构建博客检索系统
22962 学习 · 112 问题
相似问题