APP下载

ClickHouse埋点明细设计与监控平台应用

2021-09-10罗大伟

家园·电力与科技 2021年3期

罗大伟

摘要:最近两年,国内很多中大型互联网企业都在倡导数字化转型,数据已经成为公司非常重要的资产,可以帮助企业做精准营销和商业决策。监控工具早先是做服务器监测,功能单一,现在已逐步发展为实时智能分析平台:采集请求源头到底层服务所有中间调用环节运行数据。监控平台提供丰富的全端埋点采集、时序指标聚合、报文解析、日志规整、全链路追踪、数据分析、自定义告警、报盘展示等功能。论文详细描述监控平台采集海量埋点明细上报ClickHouse以及埋点明细在监控平台的应用。

关键词:数字化转型;监控平台;ClickHouse

Abstract In the last two years,many medium and large Internet companies in China have been advocating digital transformation. Data has become a very important asset for companies,which can help them make precise marketing and business decisions. The monitoring tool,which started as a single-purpose server monitor,has evolved into a real-time intelligent analysis platform that collects data from the source of the request to all intermediate calls to the underlying service. The monitoring platform provides rich functions such as full-end sensor collection,timing metric aggregation,message parsing,log normalization,full-link tracking,data analysis,custom alarm,dashboard display and so on. The paper describes in detail the monitor platform to collect a large number of sensor details to report to ClickHouse and the application of sensor details in monitoring platform.

Key Words  digital transformation,monitor platform,ClickHouse.

1引言

随着移动互联网和物联网时代的到来,微服务与全端产品盛行,企业越来越注重数据精细化治理,怎么从海量数据取提取有效的价值显得越来越重要。感知终端设备最常规做法使用监控工具在终端界面多处埋点,用户访问与操作设备时,埋点事件被触发。后端需要监测微服务与平台各方面运行流转情况,也需要做很多埋点。大批量的埋点明细数据需要供统计分析使用,落库存储需要选择一个简单、高效、适用的存储数据库。

ClickHouse是一个用于联机分析(OLAP)的列式数据库管理系统(DBMS)[4]。Yandex.Metric公司使用ClickHouse存储了超过20万亿行的数据,90%的自定义查询能够在1秒内返回[1]。ClickHouse数据表列与列之间由不同的文件保存,存储有较高的压缩比;有多样化的表引擎结构,十分靈活;既支持分区(纵向扩展,利用多线程),又支持分片(横向扩展,利用分布式),将多线程和分布式的技术应用到了极致;同时采用多主架构,规避了单点故障问题。……

登录APP查看全文