events
在 ClickHouse Cloud 中查询
此系统表中的数据本地保存在 ClickHouse Cloud 的每个节点上。 因此,要获得所有数据的完整视图,需要使用 clusterAllReplicas
函数。 有关更多详细信息,请参阅此处。
包含系统中已发生事件数量的信息。 例如,在表中,您可以找到自 ClickHouse 服务器启动以来处理了多少 SELECT
查询。
列
event
(String) — 事件名称。value
(UInt64) — 已发生事件的数量。description
(String) — 事件描述。name
(String) —event
的别名。
您可以在源文件 src/Common/ProfileEvents.cpp 中找到所有支持的事件。
示例
SELECT * FROM system.events LIMIT 5
┌─event─────────────────────────────────┬─value─┬─description────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Query │ 12 │ Number of queries to be interpreted and potentially executed. Does not include queries that failed to parse or were rejected due to AST size limits, quota limits or limits on the number of simultaneously running queries. May include internal queries initiated by ClickHouse itself. Does not count subqueries. │
│ SelectQuery │ 8 │ Same as Query, but only for SELECT queries. │
│ FileOpen │ 73 │ Number of files opened. │
│ ReadBufferFromFileDescriptorRead │ 155 │ Number of reads (read/pread) from a file descriptor. Does not include sockets. │
│ ReadBufferFromFileDescriptorReadBytes │ 9931 │ Number of bytes read from file descriptors. If the file is compressed, this will show the compressed data size. │
└───────────────────────────────────────┴───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
参见
- system.asynchronous_metrics — 包含定期计算的指标。
- system.metrics — 包含即时计算的指标。
- system.metric_log — 包含来自表
system.metrics
和system.events
的指标值历史记录。 - 监控 — ClickHouse 监控的基本概念。