日志系统基本可以分为两类:传统日志系统和分布式日志系统,本节我们研究分布式日志系统的相关开源实现,主要分析facebook的scribe和apache的机遇Hadoop的chukwa。
facebook的scribe
简单描述:Scribe是facebook开源的日志收集系统,在facebook内部已经得到大量的应用。它能够从各种日志源上收集日志,存储到一个中央存储系统(可以是NFS,分布式文件系统等)上,以便于进行集中统计分析处理。它为日志的“分布式收集,统一处理”提供了一个可扩展的,高容错的方案。
系统架构:
基本概念:
LocalServer和Central Server都是基于Thrift框架来实现
Client可以基于众多编程语言实现,官方提供Python实现
Scribe提供高容错性
信息处理最终汇集在Central Server端,这个系统模型可以水平扩展和多级报告。支持Hadoop海量数据分析。
apache的chukwa
简单描述:
chukwa是一个非常新的开源项目,由于其属于hadoop系列产品,因而使用了很多hadoop的组件(用HDFS存储,用mapreduce处理数据),它提供了很多模块以支持hadoop集群日志分析。
架构分析:
Chukwa has five primarycomponents:
·Agents that run on each machine and emit data.
·Collectors that receive data from the agent and write it tostable storage.
·ETL Processes for parsing and archiving the data.
·Data Analytics Scripts for aggregate Hadoop cluster health.
·HICC, the Hadoop Infrastructure Care Center; a web-portal styleinterface for displaying data.
Below is a figure showing the Chukwa data pipeline,annotated with data dwell times at each stage. A more detailed figure isavailable at the end of this document.
学习结论:环境搭建比较简单。但依赖Hadoop集群。如果要启用其HICC图形接口,则依赖HBase集群。
其他开源实现:
linkedin的kafka
cloudera的flume