PaaS/Data

Filebeat와 Elastic Search 연동

armyost 2022. 7. 15. 17:19
728x90

OS : CentOS

 

1. Filebeat 인스톨

# vi /etc/yum.repos.d/Elastic.repo
---------------------------------------------
[elastic-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
# yum -y install filebeat

 

2. Filebeat 환경설정

# vi /etc/filebeat/filebeat.yml
------------------------------------------
##input 설정

filebeat.inputs:
- type: log
  enabled: true #true로 수정
  paths:
    - /var/log/gitlab/nginx/gitlab_access.log

##output 설정

output.elasticsearch:
  hosts: ["192.168.122.16:9200","192.168.122.17:9200"]
  #protocol: "https"
  #api_key: "id:api_key"
  #username: "elastic"
  #password: "changeme"

 

3. Filebeat 서비스 시작

# systemctl enable filebeat
# systemctl start filebeat

 

4. 정상 수집 확인

# curl 192.168.122.16:9200/_cat/indices?v

 

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

ElasticSearch 클러스터 튜닝 가이드  (0) 2022.07.22
ElasticSearch 기본 개념  (0) 2022.07.21
Kibana 7.10 올리기 및 Elastic Search 연동  (0) 2022.07.15
ElasticSearch 7.10 Cluster 올리기  (0) 2022.07.15
Hadoop 이란?  (0) 2022.07.04