Log system architecture
0. 技术选型参考
1. Collector
Keywords: Collector, Processor
| 名称 | Beats | Fluentd-bit |
|---|---|---|
| Introduction | Beats are a collector and processor of lightweight (resource efficient, no dependencies, small) and open source log shippers that act as agents installed on the different servers in your infrastructure for collecting logs or metrics. | Fluent Bit was born to address the need for a high performance and optimized tool that can collect and process data from any input source, unify that data and deliver it to multiple destinations. |
| Owner | Elastic | Treasure Data |
| Open Source | True | True |
| Github Stars | 5742 | 608 |
| License | Apache License v2.0 | Apache License v2.0 |
| Scope | Containers / Servers / K8S | Containers / Servers / K8S |
| Language | Go | C |
| Memory | ~10MB | ~500KB |
| Performance | High | High |
| Dependencies | Zero dependencies, unless some special plugin requires them. | Zero dependencies, unless some special plugin requires them. |
| Category | Auditbeat,Filebeat,Heartbeat,Metricbeat,Packetbeat,Winlogbeat | NaN |
| Configuration | File(.yml)/Cmd | File(custom file extension and syntax)/Cmd |
| Essence | Collector & Processor | Collector & Processor |
| Input/Module | File, Docker, Syslog, Nginx, Mysql, Postgresql, etc | File,CPU, Disk, Docker, Syslog, etc |
| Output | Elasticsearch, Logstash, Kafka, Redis, File, Console | ES, File, Kafka, etc |
1.1 Filebeat 架构图
- Ingest Node - A es plugin which pre-process documents before the actual document indexing happen and replace for Logstash. The ingest node intercepts bulk and index requests, it applies transformations, and it then passes the documents back to the index or bulk APIs. Define a pipeline(Processors) that specifies a series of processors, then register the pipeline id in Filebeat configuration file.
- Kafka - Prevent loss of data and manage logging output speed.
1.2 Fluent bit 架构图
| Name | Description | Samples |
|---|---|---|
| Input | Entry point of data. Implemented through Input Plugins, this interface allows to gather or receive data. | Samples |
| Parser | Parsers allow to convert unstructured data gathered from the Input interface into a structured one. Parsers are optional and depends on Input plugins. | Prospector and processors in Filebeat |
| Filter | The filtering mechanism allows to alter the data ingested by the Input plugins. Filters are implemented as plugins. | Prospector and processors in Filebeat |
| Buffer | By default, the data ingested by the Input plugins, resides in memory until is routed and delivered to an Output interface. | |
| Routing | Data ingested by an Input interface is tagged, that means that a Tag is assigned and this one is used to determinate where the data should be routed based on a match rule. | |
| Output | An output defines a destination for the data. Destinations are handled by output plugins. Note that thanks to the Routing interface, the data can be delivered to multiple destinations. | Samples |
2. Log Transporter
Keywords: Collector, Processor, Aggregator
| 名称 | Logstah | Fluentd |
|---|---|---|
| Introduction | Logstash is an open source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to your stash. | Fluentd is an open source data collector, which lets you unify the data. |
| Owner | Elastic | Treasure Data |
| Open Source | True | True |
| Github Stars | 9105 | 6489 |
| License | Apache License v2.0 | Apache License v2.0 |
| Scope | Containers / Servers / K8S | Containers / Servers / K8S |
| Language | JRuby(JVM) | Ruby & C |
| Memory | 200MB+ | ~40MB |
| Performance | Middle | High |
| Dependencies | JVM | Ruby Gem |
| Configuration | File(custom file extension and syntax)/Cmd | File(custom file extension and syntax)/Cmd |
| Essence | Collector, Processor, Aggregator | CCollector, Processor, Aggregator |
| Input/Module | Limited only by your imagination(Serilog) | Limited only by your imagination(Nlog) |
| Output | Limited only by your imagination | Limited only by your imagination |
Further Reading: Fluentd vs. Logstash: A Comparison of Log Collectors
3. 初步总结
| 比较 | Beats + Logstash | Fluentd bit + Fluentd | 说明 |
|---|---|---|---|
| 功能实现 | √ | √ | 基本一致 |
| 安装与配置简易性 | √ | ||
| 内存占用 | √ | JVM 特性使然 | |
| 可靠性 | √ | √ | 前者使用 registry file + redis 实现可靠性,后者使用内置 buffering 实现可靠性 |
| 可扩展性 | √ | √ | 插件生态和可扩展性基本一致。后者为分布型插件管理 |
| 趋势 | √ | ELK -> EFK | |
| 其他 | √ | √ | 前者更倾向于使用 go & java 技术栈,后者有 docker, k8s 官方 log driver 类型和案例支持 |
Tips: 任一层级都可以自由替换.
4. Visualizer
Keywords: Query, Analyze, Monitor
| 名称 | Kibana | Grafana |
|---|---|---|
| Introduction | Kibana is an open source data visualization plugin for Elasticsearch. | Data visualization & Monitoring with support for Graphite, InfluxDB, Prometheus, Elasticsearch and many more databases.The leading open source software for time series analytics. |
| Owner | Elastic | Grafana |
| Open Source | True | True |
| Github Stars | 9k+ | 22k+ |
| License | Apache License v2.0 | Apache License v2.0 |
| Scope | ElasticSearch only | ElasticSearch, InfluxDB, PostgreSQL etc |
| Language | Javascript | Go & Typescript |
| Configuration | File(.yml)/Cmd | File(custom file extension and syntax)/Cmd |
| Simple Query | Lucene syntax and filter components | filter components.Different from each other data source |
| Full-Text Query | Yes | No |
| Security | Plugins or libraries | Integration |
| Notification | Plugins or libraries | Integration |
| Advantages | Log, ES | Multiple data source, APM, Timeseries |
Working together.
5. Log Storage and Analyzer
Keywords:Storage, ES, Postgresql, Zombodb, Arangodb
5.1 ElasticSearch
- 同时支持单文档的对象搜索+模糊搜索+全文搜索
- Skywalking 官方支持存储媒介
- 作为流行 Output 支持绝大部分 Log 相关系统
- 天生分布式
- 一键设置过期窗口,索引重建
- ……
- 占用资源较多,对存储介质要求高
- 运维成本更高
- 持久化
- 安全性 - Search Guard
- ……
6. 总结
- Sinks(Log sinks, Beats, Fluentd-bit) -> Storages(ElasticSearch, Postgresql,Zombodb etc).
- Collctors(Beats, Fluentd-bit) -> Kafka -> Fluentd -> Storages(ElasticSearch, Postgresql,Zombodb etc).
7. 扩展
Log system architecture的更多相关文章
- Heterogeneous System Architecture
https://en.wikipedia.org/wiki/Heterogeneous_System_Architecture Steps performed when offloading calc ...
- WikiMedia system architecture
w 前端 服务端 后端
- Crazyflie 2.0 System Architecture
Crazyflie 2.0架构包含两个微控制器: A NRF51, Cortex-M0, 用于实现无线通信和电源管理: (1)按键开关逻辑(ON/OFF logic) (2)控制给其它系统供电(STM ...
- Linux System Log Collection、Log Integration、Log Analysis System Building Learning
目录 . 为什么要构建日志系统 . 通用日志系统的总体架构 . 日志系统的元数据来源:data source . 日志系统的子安全域日志收集系统:client Agent . 日志系统的中心日志整合系 ...
- 学习:Log中'main', 'system', 'radio', 'events'
在Android中不同的log写到不同的设备中,共有/dev/log/system, /dev/log/main, /dev/log/radion, /dev/log/events四中类型.其中默认L ...
- 分布式学习材料Distributed System Prerequisite List
接下的内容按几个大类来列:1. 文件系统a. GFS – The Google File Systemb. HDFS1) The Hadoop Distributed File System2) Th ...
- 100 open source Big Data architecture papers for data professionals
zhuan :https://www.linkedin.com/pulse/100-open-source-big-data-architecture-papers-anil-madan Big Da ...
- Sharing The Application Tier File System in Oracle E-Business Suite Release 12.2
The most current version of this document can be obtained in My Oracle Support Knowledge Document 13 ...
- Game Engine Architecture 9
[Game Engine Architecture 9] 1.Formatted Output with OutputDebugString() int VDebugPrintF(const char ...
随机推荐
- 阿里云 配置ssl 在nginx上
写给自己的备忘录: 很乱 如果你也是 配置nginx ssl 可以给我留言 ,我是为了 捣鼓微信小程序后台 需要https 阿里云有免费一年的 ssl服务 链接 https://www.aliyun. ...
- linux面试题-基础题1
第1章 基础题1 1.1 在装系统创建Linux分区时,一般至少需要创建两个分区( ) A.FAT.NTFS B. /usr.swap C. /boot.swap D.swap./ 1.2 ...
- ARCore中根据屏幕坐标计算射线的算法
ARCore中提供了根据屏幕坐标.视口大小及view. project矩阵计算从屏幕坐标发射一条射线的方法,此方法用于3D拾取. class Ray { public final Vector3f o ...
- linux 僵尸进程查看方式
ps -A -ostat,ppid,pid,cmd |grep -e '^[Zz]' # 结果 Z 169925 49893 [sw] <defunct> Z 169925 120690 ...
- R语言-简单模型画图
1.回归拟合 > plot(mtcars$mpg~mtcars$disp) > lmfit<-lm(mtcars$mpg~mtcars$disp) #线性回归模型 > abli ...
- 学习linux—— VMware 安装 ubantu 18 如何连接wifi
1 适配器设置 修改本地连接 2 修改VMware的虚拟网络编辑器 3 虚拟机设置
- oracle用户间表数据复制迁移
如system用户要将scott中的emp表倒入其中,按如下方法: 1.登录scott用户 2.给system用户赋予查询emp标的权限: grant select on emp to system; ...
- Pandas分组
GroupBy技术 分组运算的过程可以用下面的流程图表示出来 import pandas as pd from pandas import Series import numpy as np df = ...
- 【转】IO多路复用机制详解
高性能IO模型浅析 服务器端编程经常需要构造高性能的IO模型,常见的IO模型有四种: (1)同步阻塞IO(Blocking IO):即传统的IO模型. (2)同步非阻塞IO(Non-blocking ...
- 小强学渲染之OpenGL的GPU管线
GPU渲染流水线,是硬件真正体现渲染概念的操作过程,也是最终将图元画到2D屏幕上的阶段.GPU管线涵盖了渲染流程的 几何阶段 和 光栅化阶段,但对开发者而言,只有对顶点和片段着色器有可编程控制权,其他 ...