# Index template에 대해서 궁금한 점이 있습니다

**URL:** <https://discuss.elastic.co/t/index-template/163534>\
**Category:** 한국어 질문 및 토론\
**Created:** [January 9, 2019, 1:00pm UTC](https://discuss.elastic.co/t/index-template/163534 "2019-01-09T13:00:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sksky93](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sksky93/32/32256_2.png) [@sksky93](https://discuss.elastic.co/u/sksky93)\
**Post date:** [January 9, 2019, 1:00pm UTC](https://discuss.elastic.co/t/index-template/163534/1 "2019-01-09T13:00:07Z")

</div>

엘라스틱을 공부하던 중, Filebeat는 파일에서 읽은 내용을 message에 넣는다고 알고 있습니다. 그러면 혹시 message에 들어가 있는 자료를 필드로 나누려고 합니다.  
아래는 제 template 입니다.

> {  
> "filebeat-6.5.3" : {  
> "order" : 0,  
> "index\_patterns" : [  
> "filebeat-6.5.3-\*"  
> ],  
> "settings" : {  
> "index" : {  
> "mapping" : {  
> "total\_fields" : {  
> "limit" : "10000"  
> }  
> },  
> "refresh\_interval" : "5s",  
> "number\_of\_routing\_shards" : "30",  
> "number\_of\_shards" : "3"  
> }  
> },  
> "mappings" : {  
> "doc" : {  
> "properties" : {  
> "message" : {  
> "properties" : {  
> "contents" : {  
> "type" : "text",  
> "fields" : {  
> "alc\_cd" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "at\_contents" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "at\_contents\_cd" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "bitrate\_cd" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "bitrate\_cd\_nm" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "cd\_media\_loc" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "clt\_yn" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "dd\_disp\_approve" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "dd\_organize" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "desc\_disp\_approve" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "fg\_audio" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "fg\_quality" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "genre\_org" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "grade\_internal" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "hit" : {  
> "type" : "keyword"  
> },  
> "id\_contents" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "id\_contract" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "id\_master" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "no\_channel" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> },  
> "no\_series" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> }  
> }  
> }  
> }  
> }

템플릿은 각 인덱스마다 적용이 잘 되는데, message가 원하는 구조로 나눠지지 않습니다. 혹시 다른 방법이 있는지 궁금합니다. 그리고 파일비트로 받는 파일 형식이 tsv라 필터에서 탭을 구분자로 주어 할 생각도 있습니다. 어떤 방법이 조금 좋은가요?

추가적으로 ElasticStack 번역 책 추천부탁드리겠습니다~  
(최신일수록 좋습니다. )

---

<div class="post-metadata">

**Author:** ![kimjmin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimjmin/32/15223_2.png) [@kimjmin](https://discuss.elastic.co/u/kimjmin)\
**Post date:** [January 16, 2019, 6:32am UTC](https://discuss.elastic.co/t/index-template/163534/2 "2019-01-16T06:32:40Z")

</div>

message 필드는 템플릿만 적용한다고 되는게 아니고 ingest pipeline 을 가지고 나누셔야 합니다. 보통은 grok processor를 이용해서 먼저 나눕니다.

[https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html)

---

<div class="post-metadata">

**Author:** ![sksky93](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sksky93/32/32256_2.png) [@sksky93](https://discuss.elastic.co/u/sksky93)\
**Post date:** [January 16, 2019, 8:03am UTC](https://discuss.elastic.co/t/index-template/163534/3 "2019-01-16T08:03:29Z")

</div>

감사합니다. GROK필터 이용해 MESSAGE필드 나눠서 저장하였습니다.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 13, 2019, 8:03am UTC](https://discuss.elastic.co/t/index-template/163534/4 "2019-02-13T08:03:32Z")

</div>

Closed on February 13, 2019, 8:03am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
