跳转到主内容
跳转到主内容

system.session_log

在 ClickHouse Cloud 中进行查询

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

描述

包含所有成功和失败的登录和登出事件的信息。

示例

SELECT * FROM system.session_log LIMIT 1 FORMAT Vertical;
Row 1:
──────
hostname:                clickhouse.eu-central1.internal
type:                    LoginSuccess
auth_id:                 45e6bd83-b4aa-4a23-85e6-bd83b4aa1a23
session_id:
event_date:              2021-10-14
event_time:              2021-10-14 20:33:52
event_time_microseconds: 2021-10-14 20:33:52.104247
user:                    default
auth_type:               PLAINTEXT_PASSWORD
profiles:                ['default']
roles:                   []
settings:                [('load_balancing','random'),('max_memory_usage','10000000000')]
client_address:          ::ffff:127.0.0.1
client_port:             38490
interface:               TCP
client_hostname:
client_name:             ClickHouse client
client_revision:         54449
client_version_major:    21
client_version_minor:    10
client_version_patch:    0
failure_reason: