你可以的,加油

ES5.1 导入oracle数据,document_id指定为数据表的主键var00

Logstash | 作者 Lincoln | 发布于2017年03月10日 | 阅读数:5286

input {
    jdbc {
        jdbc_driver_library => "/elasticsearch-5.1.1/lib/ojdbc6.jar"
        jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
        jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521:orcl"
        jdbc_user => "usr01"
        jdbc_password => "ps01"
        statement => "select VAR00, VAR01,VAR03,VAR04,VAR05,VAR06 from CITY_DRUG_DEMO"
    }
}
output{
    elasticsearch {
        hosts =>["localhost:9200"]
        index => "assistant"
        document_type => "drug"
        document_id=%{id}"
    }
}
已邀请:

lz8086 - es小司机

赞同来自:

请问logstash-input-jdbc怎么安装上的?
到这一步就进行不下去了
gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
直接超时
Error fetching https://gems.ruby-china.org/:
    Errno::ETIMEDOUT: Connection timed out - connect(2) (z)[/url]
 
麻烦了

ralfsqual

赞同来自:

最新版本的logstash各种插件都装好的,直接用

要回复问题请先登录注册