clickhouse原生监控项,系统表描述

本文介绍了ClickHouse的原生监控系统表,包括system.metrics(实时指标)、system.events(事件计数)和system.asynchronous_metrics(后台计算指标)。这些表提供了关于ClickHouse服务资源使用和查询处理统计的信息,对于监控和优化数据库性能至关重要。虽然ClickHouse不直接监控硬件资源,但建议关注磁盘、内存和网络使用率。通过对system表的查询,可以获取丰富的监控数据。
摘要由CSDN通过智能技术生成

原文链接:

Monitoring | ClickHouse Docsicon-default.png?t=M4ADhttps://clickhouse.com/docs/en/operations/monitoring

目录

三张系统表

system.mertics

system.events

system.asynchronous_metrics 


clickhouse推荐监控两大项:

  • clickhouse运行的硬件资源的利用率
  • clickhouse服务的各项记录指标

对于硬件资源利用率。

clickhouse官网的意思,本身不会去监控硬件资源的状态,监控硬件需要第三方工具。

clickhouse建议监控硬件项中的磁盘存储RAM网络使用率。

对于clickhouse本身指标。

如果想要跟踪clickhouse中发生的事件,可以通过ck的日志来查看,相关的连接:Server Settings | ClickHouse Docs

clickhouse的原生监控项,主要会监控两方面:

  • 服务端用于计算的各项资源指标
  • 查询处理的常见统计信息

ck的所有监控指标都可以通过系统表来查询。

三张系统表

  1. 系统表用于实现系统的部分功能,并提供对有关系统如何工作的信息的访问。
  2. 不能删除系统表(但可以执行DETACH)。
  3. 系统表在磁盘上没有数据或元数据的文件。服务器在启动时创建所有系统表。
  4. 系统表是只读的。
  5. 它们位于‘system'数据库中。

system.mertics

包含具有当前值或者可以立即计算的一些指标。该表中的数据一直是最新的。

比如当前同时处理的查询数,当前副本的延迟等等。

表中包含三列值:

  • metric (String) — 监控名称
  • value (Int64) — 监控项值
  • description (String) — 监控描述

 在 src/Common/CurrentMetrics.cpp 中列出的监控项,想看当前版本支持的监控项,可以直接ck上使用 select * from system.metrics \G

下面是21.8版本上的监控项,分组非官方,仅供参考

大略分组 监控项名称 监控项含义
Query

Number of executing queries

正在执行的查询数量

Merge

Number of executing background merges

正在执行的合并任务

PartMutation

Number of mutations (ALTER DELETE/UPDATE)

突变数量(不是发生的突变次数)

副本相关 ReplicatedFetch

Number of data parts being fetched from replica

从副本获取的part数量

ReplicatedSend

Number of data parts being sent to replicas

发送给副本的part数量

ReplicatedChecks

Number of data parts checking for consistency

正在检查一致性的part数量

后端任务 BackgroundPoolTask

Number of active tasks in BackgroundProcessingPool (merges, mutations, or replication queue bookkeeping)

后台正在执行的任务数量,比如merge任务,突变之类的

BackgroundFetchesPoolTask

Number of active tasks in BackgroundFetchesPool

BackgroundMovePoolTask Number of active tasks in BackgroundProcessingPool for moves
BackgroundSchedulePoolTask Number of active tasks in BackgroundSchedulePool. This pool is used for periodic ReplicatedMergeTree tasks, like cleaning old data parts, altering data parts, replica re-initialization, etc.
BackgroundBufferFlushSchedulePoolTask Number of active tasks in BackgroundBufferFlushSchedulePool. This pool is used for periodic Buffer flushes
BackgroundDistributedSchedulePoolTask Number of active tasks in BackgroundDistributedSchedulePool. This pool is used for distributed sends that is done in background.
BackgroundMessageBrokerSchedulePoolTask Number of active tasks in BackgroundProcessingPool for message streaming
CacheDictionaryUpdateQueueBatches Number of 'batches' (a set of keys) in update queue in CacheDictionaries.
CacheDictionaryUpdateQueueKeys Exact number of keys in update queue in CacheDictionaries.
DiskSpaceReservedForMerge

Disk space reserved for currently running background merges. It is slightly more than the total size of currently merging parts.

为当前运行的后台合并保留的磁盘空间。 它略大于当前合并部分的总大小。

QueryPreempted

Number of queries that are stopped and waiting due to 'priority' setting.

由于“优先级”设置而停止和等待的查询数。

客户端连接数量 TCPConnection Number of connections to TCP server (clients with native interface), also included server-server di
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Aiky哇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值