日志收集方案调研
目录
rocketmq客户端接入
缺点是使用rocketmq客户端,是java客户端,多语言接入不好。开发者使用不方便。
Flume
官网:http://flume.apache.org/
ELK
https://www.elastic.co/cn/what-is/elk-stack
logstash占用资源高
https://my.oschina.net/itblog/blog/547250
beats收集日志占用资源低
https://www.linuxidc.com/Linux/2017-09/147091.htm
腾讯
腾讯数据平台
https://wiki.open.qq.com/wiki/SDK%E4%B8%8B%E8%BD%BD
腾讯云日志接入
https://cloud.tencent.com/solution/cloudlog
后台
客户端
网络流日志
https://cloud.tencent.com/document/product/682/18931
日志采集方式 之 API采集
https://cloud.tencent.com/document/product/614/16873
POST /structuredlog?topic_id=xxxxxxxx-xxxx-xxxx-xxxx HTTP/1.1
Host: <Region>.cls.tencentyun.com
Authorization: <AuthorizationString>
Content-Type: application/x-protobuf
<LogGroupList 的 PB 格式打包内容>
日志采集方式 之 Agent模式
- 客户端bugly平台
- 主要是客户端日志上报
网易
http://blog.itpub.net/31077337/viewspace-2200166/
Zlogfabric
谷歌云日志平台
- SDK模式:有各种语言的SDK:
亚马逊集中式日志
Flunet bit 支持AGENT, API(TCP)
https://aws.amazon.com/cn/blogs/china/centralized-container-logging-fluent-bit/
Fluent Bit is an open source and multi-platform log processor tool which aims to be a generic Swiss knife for logs processing and distribution.
Nowadays the number of sources of information in our environments is ever increasing. Handling data collection at scale is complex, and collecting and aggregating diverse data requires a specialized tool that can deal with:
- Different sources of information
- Different data formats
- Data Reliability
- Security
- Flexible Routing
- Multiple destinations
Fluent bit源码
https://github.com/fluent/fluent-bit
cloudTrail
https://blog.csdn.net/iloveaws/article/details/103559710
facebook集中式日志管理
LogDevice:https://github.com/facebookincubator/LogDevice
Scribe https://github.com/facebookarchive/scribe
EFK
- EFK(ElasticSearch - Fluentd - Kibana)
Agent模式 vs API模式 vs SDK模式
类别名称 | LogListener 采集 | API 方式采集 | SDK模式 |
修改代码 | 对应用程序是无侵入式,无需修改代码 | 需修改应用程序代码才能上报日志 | 需要修改代码 |
断点续传 | 支持断点续传日志 | 自行代码实现 | SDK能力决定 |
失败重传 | 自带重试机制 | 自行代码实现 | SDK能力决定 |
本地缓存 | 支持本地缓存,高峰期间保障数据完整 | 自行代码实现 | SDK能力决定 |
资源占用 | 占用内存、CPU 等资源 | 无额外资源占用 | 有资源占用 |
语言支持 | 所有语言 | 所有语言 | SDK支持的特定语言 |