Querying in ClickHouse CloudThe data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the
clusterAllReplicas function. See here for further details.Description
Contains information about all successful and failed login and logout events.Columns
hostname(LowCardinality(String)) β Hostname of the server executing the query.type(Enum8(βLoginFailureβ = 0, βLoginSuccessβ = 1, βLogoutβ = 2)) β Login/logout result. Possible values: LoginFailure β Login error. LoginSuccess β Successful login. Logout β Logout from the system.auth_id(UUID) β Authentication ID, which is a UUID that is automatically generated each time user logins.session_id(String) β Session ID that is passed by client via HTTP interface.event_date(Date) β Login/logout date.event_time(DateTime) β Login/logout time.event_time_microseconds(DateTime64(6)) β Login/logout starting time with microseconds precision.user(Nullable(String)) β User name.auth_type(Nullable(Enum8(βNO_PASSWORDβ = 0, βPLAINTEXT_PASSWORDβ = 1, βSHA256_PASSWORDβ = 2, βDOUBLE_SHA1_PASSWORDβ = 3, βLDAPβ = 4, βKERBEROSβ = 5, βSSL_CERTIFICATEβ = 6, βBCRYPT_PASSWORDβ = 7, βSSH_KEYβ = 8, βHTTPβ = 9, βJWTβ = 10, βSCRAM_SHA256_PASSWORDβ = 11, βNO_AUTHENTICATIONβ = 12))) β The authentication type.profiles(Array(LowCardinality(String))) β The list of profiles set for all roles and/or users.roles(Array(LowCardinality(String))) β The list of roles to which the profile is applied.settings(Array(Tuple(LowCardinality(String), String))) β Settings that were changed when the client logged in/out.client_address(IPv6) β The IP address that was used to log in/out.client_port(UInt16) β The client port that was used to log in/out.interface(Enum8(βTCPβ = 1, βHTTPβ = 2, βgRPCβ = 3, βMySQLβ = 4, βPostgreSQLβ = 5, βLocalβ = 6, βTCP_Interserverβ = 7, βPrometheusβ = 8, βBackgroundβ = 9)) β The interface from which the login was initiated.client_hostname(String) β The hostname of the client machine where the clickhouse-client or another TCP client is run.client_name(String) β The clickhouse-client or another TCP client name.client_revision(UInt32) β Revision of the clickhouse-client or another TCP client.client_version_major(UInt32) β The major version of the clickhouse-client or another TCP client.client_version_minor(UInt32) β The minor version of the clickhouse-client or another TCP client.client_version_patch(UInt32) β Patch component of the clickhouse-client or another TCP client version.failure_reason(String) β The exception message containing the reason for the login/logout failure.certificate_subjects(Array(LowCardinality(String))) β The list of subjects (Common Name and Subject Alternative Names) of the TLS client certificate presented on the connection, in the form βCN:β¦β / βSAN:β¦β. Empty if no certificate was presented.certificate_serial(LowCardinality(String)) β Serial number of the TLS client certificate. Empty if no certificate was presented.certificate_issuer(LowCardinality(String)) β Issuer of the TLS client certificate. Empty if no certificate was presented.certificate_not_before(Nullable(DateTime64)) β Time from which the TLS client certificate is valid. NULL if no certificate was presented.certificate_not_after(Nullable(DateTime64)) β Time after which the TLS client certificate expires. NULL if no certificate was presented.
Example
Query
Response