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

> This table contains histogram metrics that can be calculated instantly and exported in the Prometheus format. It is always up to date.

# system.histogram_metrics

<Info>
  **Querying in ClickHouse Cloud**

  The 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](/reference/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.
</Info>

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

This table contains histogram metrics that can be calculated instantly and exported in the Prometheus format. It is always up to date. Replaces the deprecated `system.latency_log`.

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

* `metric` ([String](/reference/data-types/string)) — Metric name.
* `value` ([Float64](/reference/data-types/float)) — Metric value.
* `description` ([String](/reference/data-types/string)) — Metric description.
* `labels` ([Map(String, String)](/reference/data-types/map)) — Metric labels.

**Aliases:**

* `name` — Alias for `metric`.

<h2 id="example">
  Example
</h2>

You can use a query like this to export all the histogram metrics in the Prometheus format.

```sql theme={null}
SELECT
  metric AS name,
  toFloat64(value) AS value,
  description AS help,
  labels,
  'histogram' AS type
FROM system.histogram_metrics
FORMAT Prometheus
```

<h2 id="metric_descriptions">
  Metric descriptions
</h2>

| Metric                                                       | Description                                                                                                                       |
| ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| `keeper_response_time_ms_bucket`                             | The response time of Keeper, in milliseconds.                                                                                     |
| `keeper_client_queue_duration_milliseconds_bucket`           | Time requests spend waiting to be enqueued and waiting in the queue before being processed by the Keeper client, in milliseconds. |
| `keeper_receive_request_time_milliseconds_bucket`            | Time to receive and parse a request from the client in the Keeper TCP handler, in milliseconds.                                   |
| `keeper_dispatcher_requests_queue_time_milliseconds_bucket`  | Time a request spends in the Keeper dispatcher requests queue, in milliseconds.                                                   |
| `keeper_write_pre_commit_time_milliseconds_bucket`           | Time to preprocess a write request before Raft commit, in milliseconds.                                                           |
| `keeper_write_commit_time_milliseconds_bucket`               | Time to process a write request after Raft commit, in milliseconds.                                                               |
| `keeper_dispatcher_responses_queue_time_milliseconds_bucket` | Time a response spends in the Keeper dispatcher responses queue, in milliseconds.                                                 |
| `keeper_send_response_time_milliseconds_bucket`              | Time to send a response to the client in the Keeper TCP handler (includes queueing and writing to socket), in milliseconds.       |
| `keeper_read_wait_for_write_time_milliseconds_bucket`        | Time a read request waits for the write request it depends on to complete, in milliseconds.                                       |
| `keeper_read_process_time_milliseconds_bucket`               | Time to process a read request in Keeper, in milliseconds.                                                                        |
| `keeper_batch_size_elements_bucket`                          | Batch size sent to Raft, in elements.                                                                                             |
| `keeper_batch_size_bytes_bucket`                             | Batch size sent to Raft, in bytes.                                                                                                |
| `filesystem_cache_evicted_segment_hits_bucket`               | Distribution of cache-hit counts on file segments at the moment of their eviction, labelled by cache name.                        |
| `filesystem_cache_evicted_segment_size_bytes_bucket`         | Distribution of byte sizes of evicted file segments, labelled by cache name.                                                      |
| `filesystem_cache_evicted_segment_hits_by_user_bucket`       | Distribution of cache-hit counts on evicted file segments, labelled by cache name and user id.                                    |
| `filesystem_cache_evicted_segment_size_bytes_by_user_bucket` | Distribution of byte sizes of evicted file segments, labelled by cache name and user id.                                          |

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

* [system.asynchronous\_metrics](/reference/system-tables/asynchronous_metrics) — Contains periodically calculated metrics.
* [system.events](/reference/system-tables/events) — Contains a number of events that occurred.
* [system.metric\_log](/reference/system-tables/metric_log) — Contains a history of metrics values from tables `system.metrics` and `system.events`.
* [Monitoring](/guides/oss/deployment-and-scaling/monitoring/monitoring) — Base concepts of ClickHouse monitoring.
