[elasticsearch guide](https://www.elastic.co/guide/en/elasticsearch/reference/8.8/index.html) [kibana guide](https://www.elastic.co/guide/en/kibana/current/index.html) 基本上用ubuntu安裝deb的方式感覺是最快的 用docker的問題是要修改設定檔的時候有點不方便 # 裝Ubuntu的部分直接跳過 這邊的環境用vmware pro 裝 ubuntu 20,隨便裝應該都沒差 用這個方式固定虛擬機的IP * 子標題: Assigning Static IP Addresses to Virtual Machines via DHCP on Windows * [DHCP 靜態IP](https://linuxhint.com/configure-dhcp-server-vmware-workstation-pro-16/) # ElasticSearch [install guide](https://www.elastic.co/guide/en/elasticsearch/reference/8.8/deb.html) 這邊四行下去直接裝起來,但還沒啟動 ![](https://hackmd.io/_uploads/HJn2C9PF2.png) 裝好後這邊會提示你預設的帳號密碼 ![](https://hackmd.io/_uploads/H1KrJiwtn.png) 預設帳號是elastic 密碼是亂數產生 可以用這行指令手動修改密碼 ```bash= sudo /usr/share/elasticsearch/bin/elasticsearch-reset-password --interactive -u elastic ``` 接著在作業系統註冊成Service,並且啟動 ![](https://hackmd.io/_uploads/HJN2kowK3.png) 最後用瀏覽器開這個網址 https://<虛擬機的IP>:9200/ 輸入帳號密碼 應該要能夠看到info message ![](https://hackmd.io/_uploads/rJebLoPF2.png) # Fleet Fleet就是可以裝Elastic Agent把其他機器的資訊傳到ElasticSearch Elastic Agent有Server與普通Agent的模式 Server Agent會先去ElasticSearch抓設定檔(Policy) 然後其他Agent統一向ServerAgent拿設定檔 最後全部的Agent會向ElasticSearch吐資料 ![](https://hackmd.io/_uploads/rkzeFjwFn.png) 虛擬機重開後如果發現agent都沒有上線 可以先重新啟動作為Server的Elastic Agent 當作Server的Agent的上線後 然後再重開Client的Agent ```bash= sudo systemctl restart elastic-agent # Server跟Client的指令都一樣 ```