간단한 oracle - logstash 연결 테스트
-
ojdbc 드라이버 다운로드
-
logstash configure 파일 생성 예) jdbc-export-test.conf
input { jdbc { jdbc_driver_library => "/logstash-5.4.1/lib/ojdbc7.jar" jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver" jdbc_connection_string => "jdbc:oracle:thin:@IP/TNSNAME" jdbc_user => "username" jdbc_password => "password" statement => "select * from dual" } } output { stdout { codec => rubydebug } }
-
elasticsearch 연동
-
output elasticsearch 추가
output { stdout { codec => rubydebug } elasticsearch { hosts => ["localhost:9200"] index => "school" document_type => "students" } }
-
-
실행
/logstash-5.4.1/bin 하위 /.logstash -f jdbc-export-test.conf