轉載請註明出處
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
開啓Kibana中文
打開配置文件,將i18n.locale
的註釋去掉,改成zh-CN
vim /usr/local/etc/kibana/kibana.yml
啓動
前臺啓動
需要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
*添加Apache日誌
將setup.kibana
中的host
註釋去掉
vim /usr/local/etc/filebeat/filebeat.yml
開啓Apache
filebeat modules enable apache
filebeat setup
修改apache的Log路徑
vim /usr/local/etc/filebeat/modules.d/apache.yml