v.25.11Experimental Feature

Support part of the Prometheus HTTP Query

Support part of the Prometheus HTTP Query API. To enable it, add a rule with type query_api in the <prometheus> section in the configuration file. Supported handlers are /api/v1/query_range and /api/v1/query. #86132 (Nikita Mikhaylov).
Support for part of the Prometheus HTTP Query API has been added to ClickHouse.

Why it matters

This feature enables ClickHouse to handle Prometheus query requests, allowing users to query ClickHouse using Prometheus-compatible HTTP API endpoints. It facilitates integration with Prometheus-based monitoring and alerting systems by supporting their query interfaces.

How to use it

To enable this feature, add a rule with type query_api in the <prometheus> section of the ClickHouse configuration file. Supported handlers include /api/v1/query_range and /api/v1/query, which correspond to Prometheus HTTP API endpoints for retrieving range and instant queries respectively.