> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> System table containing aggregated statistics of ZooKeeper operations grouped by session, path, operation type, component, and subrequest flag.

# system.aggregated_zookeeper_log

<h2 id="description">
  Description
</h2>

This table contains aggregated statistics of ZooKeeper operations (e.g. number of operations, average latency, errors) grouped by `(session_id, parent_path, operation, component, is_subrequest)` and periodically flushed to disk.

Unlike [system.zookeeper\_log](/reference/system-tables/zookeeper_log) which logs every individual request and response, this table aggregates operations into groups, making it much more lightweight and therefore more suitable for production workloads.

Operations that are part of a `Multi` or `MultiRead` batch are tracked separately via the `is_subrequest` column. Subrequests have zero latency because the total latency is attributed to the enclosing `Multi`/`MultiRead` operation.

<h2 id="columns">
  Columns
</h2>

* `hostname` ([LowCardinality(String)](/reference/data-types/lowcardinality)) — Hostname of the server.
* `event_date` ([Date](/reference/data-types/date)) — Date the group was flushed.
* `event_time` ([DateTime](/reference/data-types/datetime)) — Time the group was flushed.
* `session_id` ([Int64](/reference/data-types/int-uint)) — Session id.
* `parent_path` ([String](/reference/data-types/string)) — Prefix of the path.
* `operation` ([Enum16('Close' = -11, 'Error' = -1, 'Watch' = 0, 'Create' = 1, 'Remove' = 2, 'Exists' = 3, 'Get' = 4, 'Set' = 5, 'GetACL' = 6, 'SetACL' = 7, 'SimpleList' = 8, 'Sync' = 9, 'Heartbeat' = 11, 'List' = 12, 'Check' = 13, 'Multi' = 14, 'Create2' = 15, 'Reconfig' = 16, 'CheckWatch' = 17, 'RemoveWatch' = 18, 'MultiRead' = 22, 'Auth' = 100, 'SetWatch' = 101, 'SetWatch2' = 105, 'AddWatch' = 106, 'FilteredList' = 500, 'CheckNotExists' = 501, 'CreateIfNotExists' = 502, 'RemoveRecursive' = 503, 'CheckStat' = 504, 'TryRemove' = 505, 'FilteredListWithStatsAndData' = 506, 'ListRecursive' = 507, 'SessionID' = 997)](/reference/data-types/enum)) — Type of ZooKeeper operation.
* `is_subrequest` ([UInt8](/reference/data-types/int-uint)) — Whether this operation was a subrequest inside a Multi or MultiRead operation.
* `count` ([UInt32](/reference/data-types/int-uint)) — Number of operations in the (session\_id, parent\_path, operation, component, is\_subrequest) group.
* `errors` ([Map(Enum8('ZNOWATCHER' = -121, 'ZNOTREADONLY' = -119, 'ZSESSIONMOVED' = -118, 'ZNOTHING' = -117, 'ZCLOSING' = -116, 'ZAUTHFAILED' = -115, 'ZINVALIDACL' = -114, 'ZINVALIDCALLBACK' = -113, 'ZSESSIONEXPIRED' = -112, 'ZNOTEMPTY' = -111, 'ZNODEEXISTS' = -110, 'ZNOCHILDRENFOREPHEMERALS' = -108, 'ZBADVERSION' = -103, 'ZNOAUTH' = -102, 'ZNONODE' = -101, 'ZAPIERROR' = -100, 'ZOUTOFMEMORY' = -10, 'ZINVALIDSTATE' = -9, 'ZBADARGUMENTS' = -8, 'ZOPERATIONTIMEOUT' = -7, 'ZUNIMPLEMENTED' = -6, 'ZMARSHALLINGERROR' = -5, 'ZCONNECTIONLOSS' = -4, 'ZDATAINCONSISTENCY' = -3, 'ZRUNTIMEINCONSISTENCY' = -2, 'ZSYSTEMERROR' = -1, 'ZOK' = 0), UInt32)](/reference/data-types/map)) — Errors in the (session\_id, parent\_path, operation, component, is\_subrequest) group.
* `average_latency` ([Float64](/reference/data-types/float)) — Average latency across all operations in (session\_id, parent\_path, operation, component, is\_subrequest) group, in microseconds. Subrequests have zero latency because the latency is attributed to the enclosing Multi or MultiRead operation.
* `component` ([LowCardinality(String)](/reference/data-types/lowcardinality)) — Component that caused the event.

<h2 id="see-also">
  See also
</h2>

* [system.zookeeper\_log](/reference/system-tables/zookeeper_log) — Detailed per-request ZooKeeper log.
* [ZooKeeper](/guides/oss/best-practices/tips#zookeeper)
