Skip to content

Latest commit

 

History

History
42 lines (37 loc) · 869 Bytes

logstash_simple.asciidoc

File metadata and controls

42 lines (37 loc) · 869 Bytes

간단한 oracle - logstash 연결 테스트

  1. ojdbc 드라이버 다운로드

  2. 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
    	}
    }
  3. elasticsearch 연동

    • output elasticsearch 추가

      output {
              stdout {
                      codec => rubydebug
              }
              elasticsearch {
                      hosts => ["localhost:9200"]
                      index => "school"
                      document_type => "students"
              }
      }
  4. 실행

    /logstash-5.4.1/bin 하위
    /.logstash -f jdbc-export-test.conf