PaaS/Data

ElasticSearch-Filebeat 인덱스 이름 Custom하게 변경

armyost 2022. 8. 8. 11:21
728x90

Filebeat를 Aggregator로 사용하게 되면 인덱스 이름, 인덱스 세팅 등이 Filebeat Configuration에서 이루어진다. 

그래서 커스텀한 인덱스 설정을 위해서 filebeat.yml을 손대야 한다.

 

Elastic Stack Version : 7.10 

 

1. 수집대상 서버에서 filebeat.yml설정파일을 찾는다. 

# vi /etc/filebeat/filebeat.yml
----------------------수정-------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["192.168.122.16:9200","192.168.122.17:9200"]

  # Protocol - either `http` (default) or `https`.
  #protocol: "https"
  index: "jpkim-template-%{+yyyy.MM.dd}"
setup.template.name: "jpkim-template"
setup.template.pattern: "jpkim-template-*"
setup.template.enabled: false
setup.ilm.enabled: false
  • setup.template.enabled : Set to false to disable template loading. If this is set to false, you must load the template manually.
  • setup.template.name : The name of the template. The default is filebeat. The Filebeat version is always appended to the given name, so the final name is filebeat-%{[agent.version]}.
  • setup.template.pattern : The template pattern to apply to the default index settings. The default pattern is filebeat. The Filebeat version is always included in the pattern, so the final pattern is filebeat-%{[agent.version]}.

 

2. 재기동하여 설정을 적용

# systemctl restart filebeat

 

3. Kibana에서 해당 인덱스에 대한 매핑정보 등 정의

 

4. 인덱스 이름 변경적용 여부 확인

 

'PaaS > Data' 카테고리의 다른 글

Data Mesh란?  (0) 2022.08.16
Oracle의 Segment Advisor 사용하기  (0) 2022.08.09
ElasticSearch 색인성능 최적화  (0) 2022.07.24
ElasticSearch 운영하기  (0) 2022.07.24
ElasticSearch 클러스터 튜닝 가이드  (0) 2022.07.22