![](https://img-blog.csdnimg.cn/20210525145641708.png)
ELK(Elasticsearch + Logstash + Kibana)
- 三款开源工具的名称缩写,基于lucence搜索引擎,用于
对日志文件数据进行抽取、分析、存储、展示
的日志引擎。- 数据流程:nohup.log ->
Filebeat
->Kafka
->Logstash
->Elasticsearch
->Kibana
- nohup.log,日志文件示例,Filebeat读取对象,Filebeat只能从日志文件中读取数据;
- Filebeat,一个比Logstash更轻量级的日志处理工具,可以部署到不同的服务器上,来对分布式架构日志进行抽取,将抽取后的数据发送到Kafka;
- Kafka,消息中间件,用来转发从Filebeat接收到的消息,到Logstash,具有数据削峰、缓冲的作用;
- Logstash,日志分析工具,用来对日志数据进行分析和过滤,将处理后的数据发送给Elasticsearch;
- Elasticsearch,非关系型数据库,用于存储从Logstash接收到的数据;
- Kibana,数据展示工具,展示从Elasticsearch中读取到的数据。
支持 Restful API 格式的接口调用
。
![](https://img-blog.csdnimg.cn/20210525151717139.png)
Filebeat:一个相比Lagstash更轻量级的日志收集工具,隶属于Beats。
官网:https://www.elastic.co/cn/products/beats/filebeat
下载:https://www.elastic.co/cn/downloads/beats/filebeat
文档:https://www.elastic.co/guide/en/beats/filebeat/5.6/index.html
![](https://img-blog.csdnimg.cn/20210525145700220.png)
Kafka:消息中间件,防止瞬间消息过多,撑跨程序,起到缓冲作用。
下载:http://kafka.apache.org/downloads
英文文档:http://kafka.apache.org/documentation/
中文文档:https://kafka.apachecn.org/
![](https://img-blog.csdnimg.cn/20210525145706925.png)
Logstash:数据抽取、格式化工具,输出到ES。
官网:https://www.elastic.co/cn/products/logstash
下载:https://www.elastic.co/cn/downloads/logstash
文档:https://www.elastic.co/guide/en/logstash/5.6/index.html
![](https://img-blog.csdnimg.cn/20210525145713577.png)
Elasticsearch:非关系型数据库,可以替换Mongodb,用于存储分析后的数据。
官网:https://www.elastic.co/cn/products/elasticsearch
下载:https://www.elastic.co/cn/downloads/elasticsearch
文档:https://www.elastic.co/guide/en/elasticsearch/reference/5.6/index.html
中文文档:https://www.elastic.co/guide/cn/elasticsearch/guide/current/index.html
中文社区:https://elasticsearch.cn/
![](https://img-blog.csdnimg.cn/20210525145720998.png)
Kibana:数据展示工具,展示从Elasticsearch中读取到的数据。
官网:https://www.elastic.co/cn/products/kibana
下载:https://www.elastic.co/cn/downloads/kibana
英文文档:https://www.elastic.co/guide/en/kibana/5.5/index.html
– The End –