본문 바로가기

분류 전체보기

Elastic stack Environment To understand the Elastic Stack platform, let’s assume that Elasticsearch is a document database that stores the structured document. The Log file format is unstructured data. Every single line of a log cannot be a single document. So, we need to parse the message and extract the key and values of the field. The program, Logstash read the files and made a structured document from an .. 더보기
elasticsearch backfill, forward-fill with previous log's value data engineering할 때, 로그를 시간 순서대로 읽어들일 때, 하나의 로그에 여러 필요한 필드들이 모여있지 않은 경우가 많다. 따라서 앞에서 찍힌 값을 뒤에서 사용하는 부분, 그리고 엑셀에서 +로 하단 필드를 이전 값을 앞,뒤 값으로 동일하게 채우는 그런 기능을 Backfill 또는 forwardFill 이라고 한다. Elasticsearch에서는 앞에 값을 사용하여 뒤에 값을 계산해서 넣는 duration시간 계산을 하는 경우도, 이와 같이 backfill 기능으로 비슷하기에 aggregate plugin을 제공하고 있다. https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html Aggregate filte.. 더보기
elastic geo_point type의 field 만들기 curl -XPUT -u elastic:패스워드 http://192.168.16.148:9200/my-index-000001 -H 'Content-Type: application/json' -d ' { "mappings": { "properties": { "location": { "type": "geo_point" } } } }' index에 미리 만들어놓고 덮어쓰기 결과 {"acknowledged":true,"shards_acknowledged":true,"index":"my-index-000001"}1001460000@logstash-node-0:/usr/share/logstash/bin$ 더보기
인덱싱 중에... 인데스 잘 생성되나 싶었는데 "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Limit of total fields [1000] has been exceeded while adding new fields [1]"}}}} 이런 에러가 뜨면서 진행되지 않았다. 의미는...인덱스 개수 제한이 기본이 1000에 걸린 것 같다. 그래서 찾아보니 세팅값 수정하면 될듯하다. You can fix the issue by increasing the value of index.mapping.total_fields.limit (default 1000) index.mapping.total_fields.limit The maximum number of fields.. 더보기
logstash grok filter kvpattern official doc: https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html Grok filter plugin | Logstash Reference [8.6] | Elastic Variable substitution in the id field only supports environment variables and does not support the use of values from the secret store. www.elastic.co filter doc : https://www.elastic.co/guide/en/logstash/current/plugins-filters-json.html JSON filter pl.. 더보기
extract multiple archive file tar tgz shell cmd 압축풀고 삭제 for file in *.tar.gz; do tar xzvf "${file}" && rm "${file}"; done or ls *.tgz | xargs -n1 tar -xzf 더보기
make grok patterns with debugger http://grokconstructor.appspot.com/do/construction Incremental Construction of Grok Patterns Incremental Construction of Grok Patterns grokconstructor.appspot.com -> 'random example' 더보기
jvm setting flag 의미 선택의미 -Xms 힙 메모리의 초기 크기 지정 -Xmx 힙 메모리의 최대 크기 지정 -XX:새로운 비율 이전 영역과 젊은 영역의 크기 비율 지정 -XX:새로운 크기 젊은 영역의 초기 크기 지정 -XX:맥스뉴사이즈 젊은 영역의 최대 크기 지정 -Xmn -XX: 뉴사이즈와 유사함 -XX : 파마 크기 영구 영역의 초기 크기 지정(Java 7 이하에서 유효) -XX : 최대 타마 크기 영역의 최대 크기 지정(Java 7 이하에 유효) -XX:메타스페이스 크기 메타스페이스 GC를 수행하기 위한 대략적인 크기 지정(java8 이상에서 유효) -XX:최대 메타스페이스 크기 메타스페이스의 최대 크기 지정(Java 8 이상에서 유효) -XX:평행GC읽기 가비지 수집기가 실행될 스레드 수 지정 -자세한 정보: GC 로그.. 더보기