Setup ELK(ElasticSearch、Logstash、Kibana) Environment
- 此文章描述如何建立ELK運行環境,以及如何啟動與使用。
- ElasticSearch的安裝可以參考此篇文章
Basic Info
- OS: CentOS 7.3
- Nginx Version: 1.8.0
- ElasticSearch Version: 5.5.0
- Logstash Version: 5.5.0
- Kibana Version: 5.5.0
Logstash Installation
About Logstash Version
- The last version downloads
- Artifacts: https://artifacts.elastic.co/downloads/logstash/logstash-[version name].tar.gz
- [version name]是Logstash的版本號
- 例如5.5.0下載位置: https://artifacts.elastic.co/downloads/logstash/logstash-5.5.0.tar.gz
Install Logstash
|
|
Configure Logstash
|
|
Kibana Installation
About Logstash Version
- The last version downloads
- Artifacts: https://artifacts.elastic.co/downloads/kibana/kibana-[version name].tar.gz
- [version name]是Logstash的版本號
- 例如5.5.0下載位置: https://artifacts.elastic.co/downloads/kibana/kibana-5.5.0-linux-x86_64.tar.gz
Install Kibana
|
|
Configure Kibana
|
|
Start ELK Process
Set Nginx Log Format and Start Nginx
- 使用Nginx作為Logstash的輸入,Nginx環境安裝可以參考此篇文章
- 將Nginx輸出Log的格式指定爲Logstash可以接受的格式
- 對應logstash-nginx-access-log.conf中的match
|
|
Start ElasticSearch
|
|
Start Logstash
|
|
Start Kibana
|
|
Kibana Web UI
- Kibana initialization web
Kibana set pattern web
Kibana index pattern web