v.22.9Improvement

Two New Metrics in system.asynchronous_metrics: NumberOfDetachedParts and NumberOfDetachedByUserParts

Two new metrics in system.asynchronous_metrics. NumberOfDetachedParts and NumberOfDetachedByUserParts. #40779 (Sema Checherinda).
Added two new metrics, NumberOfDetachedParts and NumberOfDetachedByUserParts, to the system.asynchronous_metrics table.

Why it matters

These metrics provide insights into the number of detached parts within ClickHouse tables, distinguishing parts detached automatically and those detached manually by users. This helps DBAs monitor storage and data management actions more effectively.

How to use it

Query the system.asynchronous_metrics table to retrieve the new metrics. For example, use a SQL statement like:

SELECT metric, value FROM system.asynchronous_metrics WHERE metric IN ('NumberOfDetachedParts', 'NumberOfDetachedByUserParts')