7월, 2018의 게시물 표시

ELK 설치

1. What is ELK? = Elasticsearch + Logstash + Kibana Elasticsearch: Apache Lucene 기반의 검색 서버 Logstash: log 수집기 Kibana: BI tool 2. Downloads ; Ubuntu docker 에 설치 * Elasticsearch: $> wget https://artifacts.elastic.co/downloads/elasticsearch/ elasticsearch -6.3.0.tar.gz * Logstash: $> wget https://artifacts.elastic.co/downloads/logstash/logstash-6.3.0.tar.gz * Kibana: $> wget https://artifacts.elastic.co/downloads/kibana/kibana-6.3.0_linux-x86_64.tar.gz 3. Install docker instance 2개: 1 for apache + logstash, 2 for elasticsearch + kibana docker instance 에 java 필요 (4번 java 8 설치 참조) § Apache2 설치 - 데모서버 $> sudo apt-get update $> sudo apt-get install apache2 * log format 추가 elasticsearch 가 JSON 형식의 API를 사용하기 때문 /etc/apache2/apache2.conf 파일에 아래 log format 추가 LogFormat "{ \"time\":\"%t\", \"clientip\":\"%a\",\"host\":\"%V\", \"request\":\"%U\", \"que