天天看點

Mac安裝Elastic Stack和基礎配置

轉載請注明出處

https://blog.csdn.net/aa464971/article/details/102569615

簡介

Elastic官網:https://www.elastic.co

Elastic Github:https://github.com/elastic

  • Elasticsearch: 全文搜尋引擎
  • Kibana:可視化分析平台
  • Filebeat:日志采集

安裝

Elasticsearch

brew install elastic/tap/elasticsearch-full
           

Kibana

brew install elastic/tap/kibana-full
           

Filebeat

brew install elastic/tap/filebeat-full
           

配置

配置Filebeat

比對要輸入的Log檔案路徑

vim /usr/local/etc/filebeat/filebeat.yml
           
Mac安裝Elastic Stack和基礎配置

開啟Kibana中文

打開配置檔案,将

i18n.locale

的注釋去掉,改成

zh-CN

vim /usr/local/etc/kibana/kibana.yml
           
Mac安裝Elastic Stack和基礎配置

啟動

前台啟動

需要3個終端視窗,分别啟動

filebeat -e -d "publish"
elasticsearch
kibana
           

背景啟動

nohup filebeat -e -d "publish" >/dev/null 2>log &
nohup elasticsearch >/dev/null 2>log &
nohup kibana >/dev/null 2>log &
           

全部啟動完成後,打開浏覽器通路 http://localhost:5601

Mac安裝Elastic Stack和基礎配置

*添加Apache日志

将資料添加到 Kibana

setup.kibana

中的

host

注釋去掉

vim /usr/local/etc/filebeat/filebeat.yml
           
Mac安裝Elastic Stack和基礎配置

開啟Apache

filebeat modules enable apache
filebeat setup
           

修改apache的Log路徑

vim /usr/local/etc/filebeat/modules.d/apache.yml
           
Mac安裝Elastic Stack和基礎配置

繼續閱讀