본문 바로가기

설정

logstash conf example

input {
    jdbc {
        jdbc_connection_string => "jdbc:postgresql://localhost:5432/atlasdb?useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf8"
        jdbc_user => "atlas"
        jdbc_password => "atlas"
        jdbc_validate_connection => true
        jdbc_driver_library => "/lib/postgres-42-test.jar"
        jdbc_driver_class => "org.postgresql.Driver"
        columns_charset => { "region_name_kr" => "UTF-8" }
        schedule => "* * * * *"
        statement => "SELECT region_id, region_name_full, ST_AsText(boundaries_nearby) from expedia_region_union_copy_jpa_test order by region_id asc limit 100"
   }

   stdin {
        codec => plain { charset => "UTF-8"}
   }

}
filter {

}
output {
 elasticsearch {
        hosts => [ "localhost:9200" ]
        index => "2020-05-06-wed"
        doc_as_upsert => true
        action => "update"
        document_id => "%{region_id}"
        }
 stdout { codec => rubydebug }
}

'설정' 카테고리의 다른 글

SSLError(SSLCertVerificationError - windows 파이썬 사용  (0) 2020.01.31
pg_hba.conf 개발 서버 설정  (0) 2020.01.29
hugo / github.io 블로그  (0) 2020.01.27
맥북 공장 초기화 후  (0) 2020.01.26
elasticsearch geo-shape 쿼리 조회  (0) 2019.11.20