iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 28
0
DevOps

微服務系統建置與監控系列 第 28

Day28 ELK安裝

接下來我們準備開始安裝Elasticsearch、Logstash、Kibana的環境。

ELK安裝(mac)

  1. 請先安裝JAVA,安裝完成後查看指令如下:
➜  ~ java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)
  1. Elasticsearch安裝
brew install elasticsearch //安裝
brew services start elasticsearch //啟動

安裝完成後訪問localhost:9200,可得下列結果:

curl localhost:9200
{
  "name" : "CYHB-01",
  "cluster_name" : "elasticsearch_brew",
  "cluster_uuid" : "e1hqINUrRi2cwvFsuGsg1A",
  "version" : {
    "number" : "7.9.2-SNAPSHOT",
    "build_flavor" : "oss",
    "build_type" : "tar",
    "build_hash" : "unknown",
    "build_date" : "2020-10-03T08:22:40.976826Z",
    "build_snapshot" : true,
    "lucene_version" : "8.6.2",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
  1. 安裝Kibana
brew install kibana //安裝
brew services start kibana //啟動

安裝完成後訪問localhost:5601,可得下列結果:
https://ithelp.ithome.com.tw/upload/images/20201004/20129762bm57eeixbS.png
4. 安裝Logstash

brew install logstash //安裝
brew services start logstash //啟動
  1. 安裝Filebeat
brew install filebeat //安裝
./filebeat -c filebeat.yml test output //檢查.yml是否正確

本次只是單純介紹用mac如何安裝elk,如果需其它版本或更詳細的安裝步驟,請參考官網

小結

當elk安裝完成後,我們下一章將開始用go來撰寫程式讀取elasticsearch的資料,將訊息傳送到telegram上。


上一篇
Day27 認識ELK
下一篇
Day29 ELK監控實戰
系列文
微服務系統建置與監控30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言