0%

ELK installation on Windows

ELK = elasticsearch + logstash + kibana

安裝檔案

安裝 (8.10.0)

啟動順序:Elasticsearch -> Logstash -> Kibana


為什麼需要ELK?

  • 集中管理Log
  • 資料分析、監控
  • logstash 收集Log到 elasticsearch 進行儲存並提供搜尋服務(非關聯式),最後透過 kibana 呈現資料視覺化

基本環境架設

Elasticsearch

  • 執行 @\elasticsearch-8.10.0\bin elasticsearch.bat
  • 首次啟動Elasticsearch會有密碼資訊,紀錄 elastic default passwordkibana token !!!
  • 可能會發生錯誤如下,修改 elasticsearch.yaml
1
2
xpack.security.http.ssl:
enabled: false

輸入 http://localhost:9200/ 正常顯示代表啟動成功
(登入帳號:elastic,密碼為首次啟動elastic.bat預設給的值)


Logstash

  • 新增 @\logstash-8.10.0\config logstash.conf
1
2
3
4
5
6
7
8
9
input { stdin { } }
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "logs"
user => "elastic"
password => "your_password"
}
}
  • 執行 @\logstash-8.10.0\bin
1
logstash.bat -f D:\logstash-8.10.0\config\logstash.conf

輸入 http://localhost:9600/ 正常顯示代表啟動成功


Kibana

  • 執行 @\kibana-8.10.0\bin kibana.bat

輸入 http://localhost:5601/ 正常顯示代表啟動成功

可輸入預設 elastic 或於 logstash.conf 設定的帳密