v.20.5New Feature

Resolved #7224: Added FailedQuery, FailedSelectQuery, and FailedInsertQuery Metrics to system.events Table

Resolved #7224: added FailedQuery, FailedSelectQuery and FailedInsertQuery metrics to system.events table. #11151 (Nikita Orlov).
Added FailedQuery, FailedSelectQuery, and FailedInsertQuery metrics to the system.events table in ClickHouse.

Why it matters

These new metrics enable users to monitor and analyze the number of failed queries more precisely, helping to identify issues with query execution and improve database reliability and troubleshooting.

How to use it

Users can query the system.events table to access the new metrics by selecting the FailedQuery, FailedSelectQuery, and FailedInsertQuery fields. For example:

SELECT event, value FROM system.events WHERE event IN ('FailedQuery', 'FailedSelectQuery', 'FailedInsertQuery');