业界常用分布式日志收集系统

616 阅读3分钟

本文已参与「新人创作礼」活动,一起开启掘金创作之路。

 日志收集方案调研

 

rocketmq客户端接入

缺点是使用rocketmq客户端,是java客户端,多语言接入不好。开发者使用不方便。

Flume


官网Welcome to Apache Flume — Apache Flume

Agent component diagram​编辑

ELK

ELK Stack:Elasticsearch 的开发者倾心打造 | Elastic

logstash占用资源高 

my.oschina.net/itblog/blog…​编辑

beats收集日志占用资源低

使用ELK搭建日志存储分析平台_服务器应用_Linux公社-Linux系统门户网站

​编辑

腾讯

腾讯数据平台

腾讯开放平台 OPEN.QQ.COM

腾讯云日志接入

日志数据

后台

​编辑

客户端

​编辑

网络流日志

网络流日志 产品概述-产品简介-文档中心-腾讯云

日志采集方式 之 API采集 

日志服务 使用 API 上传日志-操作指南-文档中心-腾讯云

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平台
  • 主要是客户端日志上报

网易

洪增林:网易游戏统一数据流平台架构与实践_ITPUB博客

Zlogfabric

谷歌云日志平台

  • SDK模式:有各种语言的SDK:

亚马逊集中式日志

Flunet bit 支持AGENT,  API(TCP)

使用 Fluent Bit 实现集中式容器日志记录 | 亚马逊AWS官方博客

fluentbit

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源码

github.com/fluent/flue…

cloudTrail

AWS集中式日志存储架构_沉默恶魔的博客-CSDN博客_aws 日志服务

facebook集中式日志管理

LogDevice:GitHub - facebookarchive/LogDevice: Distributed storage for sequential data

Scribe GitHub - facebookarchive/scribe: Scribe is a server for aggregating log data streamed in real time from a large number of servers.

EFK

  • EFK(ElasticSearch - Fluentd - Kibana)

    ​编辑

Agent模式 vs API模式 vs SDK模式

类别名称LogListener 采集API 方式采集SDK模式
修改代码对应用程序是无侵入式,无需修改代码需修改应用程序代码才能上报日志需要修改代码
断点续传支持断点续传日志自行代码实现SDK能力决定
失败重传自带重试机制自行代码实现SDK能力决定
本地缓存支持本地缓存,高峰期间保障数据完整自行代码实现SDK能力决定
资源占用占用内存、CPU 等资源无额外资源占用有资源占用
语言支持所有语言所有语言SDK支持的特定语言