본문 바로가기

내가 당면한 문제와 해결방안

(81)
logstash 변경분만 가져오기 으 짜증나. 튜토리얼 에는 이런것들이 잘 없음. 이런게 노하우인가봄. 한번 인덱스에 담아두고 나면. 그 다음에는 변경된 것만 로그스태시가 가져와야 빠르지... 근데 그렇게 하려면 :sql_last_value 나 last_run_path? 뭐쩌구 저쩌구를 가져오래 근데 그거는 또 tracking_column 해야한대 근데 tracking_column_type은!!!!!!!!!!!!! numeric이나 timestamp만 된대 나는 내가 저장한건 아니지만 (ㅡㅡ) string으로 YYYYMMDD이렇게 저장된 날짜를 가지고 있는데. 이미 여러군데 저장해놔서... 그냥 column하나를 timestamp타입으로 복사해서 ... tracking column으로 쓰려고... 아니 별것도 아닌데 왜 Date를 tim..
clone conf 적용 파일 input {} filter {} output {} 이런 구조. 원래는 prune 플러그인을 사용하였는데. 왜인지 설치가 안됐다. 그렇다고 로그스태시 재설치는 싫었다. 그래서 prune을 제거하고 mutate(core package에 있는 놈)으로 정리했다. 최선의 resource 사용하는 구성은 아님. 오히려 낭비하고 있는데 이런 구조를 사용하는 이유는 그냥. 이 파일 하나만 구동시키면 되기 때문이다. 음... 나름 관리의 편의? 각설하고. intput { jdbc { jdbc_connection_string => "jdbc:postgresql://아이피:디비_포트넘버/atlasdb?useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&use..
clone and postgis 상황 1 postgres table 2개를 input 2 그 중 1개를 clone 하여 3 3개의 인덱스에 각각 output 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..
clone2 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" schedule => "* * * * *"..
clone and expedia_airport_more table conf clone.conf 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" schedule => ..
multiple jdbc input and clone 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" schedule => "* * * * *"..
logstash clone 설정 하나의 인풋. 하나의 포트에서 multiple output... same host에 multiple 한 index output 설정 정확히 말하면 하나의 테이블에서 2개의 인덱스 동기화 또 다른 테이블도 가져와야하긴 함. 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 => ..
elasticsearch max_result_window 설정 보통 지금 작업 중인 elasticsearch의 document 수는 pg 테이블 기준으로 따라감. 대략 70만개 이상. 아래 슬라이드 참고했을 시. 사항. 관리자 페이지에서 굳이굳이; 누가하라고 ㅈㄹ해서 그닥 안봐도 되는 페이징을 하다보니 max_result_window를 80만까지 설정해두었는데. 성능을 버리면서까지 이렇게 할 필요없었던 것 같음. 인덱스를 새로 만들때도 아무래도 기존 인덱스의 설정 그대로 가져와서 추가해줘야하니까. 첨에 만들때부터 똑바로 서비스를 만드는게 나은것같음. 스택오버플로우 참고 (https://stackoverflow.com/questions/35206409/elasticsearch-2-1-result-window-is-too-large-index-max-result-win..