# reference URL:
# https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html
input {
jdbc {
jdbc_driver_library => "..\..\oracle-connect-test\ojdbc8.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@//xxx.xxx.xxx.xxx:1521/BIGD"
jdbc_user => "USER"
jdbc_password => "PASSWORD"
schedule => "* * * * *"
clean_run => "true"
statement => "select * FROM dbname.tablename"
jdbc_paging_enabled => "true"
jdbc_page_size => "100000"
}
stdin{
}
}
#filter { json { source => "message" remove_field => ["message"] } }
output {
elasticsearch {
hosts => "localhost:9200"
index=> "bom"
document_id => "%{material}_%{component}_%{valid_from}"
}
stdout{
codec => "json_lines"
}
}
注意,output中的index,不可以用大写字母
有一个链接用来讲解配置的: