转载请注明出处
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