跳到主要内容
跳到主要内容

metric_log

在 ClickHouse Cloud 中查询

此系统表中的数据本地保存在 ClickHouse Cloud 的每个节点上。因此,要获得所有数据的完整视图,需要使用 clusterAllReplicas 函数。有关更多详细信息,请参阅此处

包含来自表 system.metricssystem.events 的指标值历史记录,定期刷新到磁盘。

  • hostname (LowCardinality(String)) — 执行查询的服务器的主机名。
  • event_date (Date) — 事件日期。
  • event_time (DateTime) — 事件时间。
  • event_time_microseconds (DateTime64) — 具有微秒分辨率的事件时间。

示例

SELECT * FROM system.metric_log LIMIT 1 FORMAT Vertical;
Row 1:
──────
hostname: clickhouse.eu-central1.internal
event_date: 2020-09-05
event_time: 2020-09-05 16:22:33
event_time_microseconds: 2020-09-05 16:22:33.196807
milliseconds: 196
ProfileEvent_Query: 0
ProfileEvent_SelectQuery: 0
ProfileEvent_InsertQuery: 0
ProfileEvent_FailedQuery: 0
ProfileEvent_FailedSelectQuery: 0
...
...
CurrentMetric_Revision: 54439
CurrentMetric_VersionInteger: 20009001
CurrentMetric_RWLockWaitingReaders: 0
CurrentMetric_RWLockWaitingWriters: 0
CurrentMetric_RWLockActiveReaders: 0
CurrentMetric_RWLockActiveWriters: 0
CurrentMetric_GlobalThread: 74
CurrentMetric_GlobalThreadActive: 26
CurrentMetric_LocalThread: 0
CurrentMetric_LocalThreadActive: 0
CurrentMetric_DistributedFilesToInsert: 0

另请参阅