➜ mkdir elkstack
➜ cd elkstack
Elasticsearch
install
➜ curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.1.1.tar.gz
➜ tar xzvf elasticsearch-5.1.1.tar.gz
➜ cd elasticsearch-5.1.1
run
➜ bin/elasticsearch
test
http://localhost:9200?pretty=true
Kibana
install
➜ curl -L -O https://artifacts.elastic.co/downloads/kibana/kibana-5.1.1-darwin-x86_64.tar.gz
➜ tar xzvf kibana-5.1.1-darwin-x86_64.tar.gz
➜ cd kibana-5.1.1-darwin-x86_64
config
➜ kibana-5.1.1-darwin-x86_64 vi config/kibana.yml
1 | (default) |
run
➜ ./bin/kibana
test
Logstash
install
➜ curl -L -O https://artifacts.elastic.co/downloads/logstash/logstash-5.1.1.tar.gz
➜ tar xzvf logstash-5.1.1.tar.gz
config
➜ vi config/logstash.conf
1 | input { |
run
➜ bin/logstash -f config/logstash.conf
Filebeat
install
➜ curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.1.1-darwin-x86_64.tar.gz
➜ tar xzvf filebeat-5.1.1-darwin-x86_64.tar.gz
➜ cd filebeat-5.1.1-darwin-x86_64
filebeat.yml
1 | filebeat.prospectors: |
dynamic template 설정
curl -XPUT ‘http://localhost:9200/_template/filebeat?pretty' -d@filebeat.template.json
1 | { |
run
➜ sudo ./filebeat -e -c filebeat.yml
test
➜ echo {“hello”:”world”} > /tmp/mylog.log
➜ echo {“hello”:”world”} >> /tmp/mylog.log