出現問題我設定兩分鐘執行一次,但是他一直加索引到elasticsearch里面。怎么設定資料庫不更新就不往elasticsearch里面加索引
代碼如下:
input{
jdbc{
#資料庫
jdbc_connection_string => "jdbc:mysql://192.***.*.***:3306/jboa?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true"
#資料庫用戶密碼
jdbc_user => "root"
jdbc_password => "root"
#mysql jar包位置
jdbc_driver_library => "/usr/local/mysql-connector/mysql-connector-java-8.0.18.jar"
#jdbc驅動包
jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
#jdbc支持分頁
jdbc_paging_enabled => "true"
#同步資料分頁設定
jdbc_page_size => "50000"
#讀取sql陳述句
statement => "SELECT * FROM biz_check_result"
#定時執行時間
schedule => "*/2 * * * *"
#索引的型別
type => "vision"
}
}
output{
if [type] == "vision"{
elasticsearch{
hosts => ["192.***.*.***:9200"]
index => "vision-%{+YYYY.MM.dd}"
user => "elastic`"
password => "changeme"
}
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/20832.html
標籤:數據庫相關
上一篇:gin系列-重定向
下一篇:gin系列- 路由及路由組
