Docker

Docker 위에 ELK 구축

1. 개요

Docker 위에 ELK를 구축해보자. – Docker image 이용

ELK : Elasticache, Logstash, Kibana

 

2. How to Install

2.1. Install docker

curl -feSL https://get.docker.com | sudo sh

2.2. Check version

sudo docker version

2.3. Virtual Memory 용량 늘리기

vi /etc/sysctl.conf ; 추가
    vm.max_map_count=262144
sysctl vm.max_map_count ; 확인

2.4. Docker-compose 설치

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo docker-compose --version ; 확인

2.5. ELK docker 설치

sudo docker pull sebp/elk

2.6.1. ELK 실행 1

sudo docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it –name elk sebp/elk

2.6.2. ELK 실행 2

vi docker-compose.yml
    elk:
    image: sebp/elk
    ports:
        - "5601:5601"
        - "9200:9200"
        - "5044:5044"
sudo docker-compose up elk

2.7. Port별 Services

5601 : Kibana web interface
9200 : ElasticSearch JSON interface
9300 : ElasticSearch transport interface
5044 : Logstash Beats interface

View post on imgur.com

3. ELK 구성도

 

4. 참고 URL

https://elk-docker.readthedocs.io/#prerequisites

Back To Top