docs/reference/query-languages/promql.md
The Prometheus Query Language (PromQL) is a functional query language to select and aggregate metrics.
{{es}} supports PromQL queries for metrics in time series data streams (TSDS). PromQL support is not limited to metrics ingested through Prometheus remote write. All TSDS are supported, including metrics ingested through OpenTelemetry Protocol (OTLP), and the bulk API.
{{es}} supports PromQL in two ways: through a Prometheus-compatible HTTP API (for Prometheus-compatible clients) and as a PROMQL source command inside piped {{esql}} queries that allow post-processing through regular {{esql}}.
When you use the Prometheus-compatible HTTP API or embed PromQL in an {{esql}} query through the PROMQL source command, {{es}} parses PromQL into {{esql}} logical plans and evaluates those plans against TSDS metrics.
{{es}} uses the same {{esql}} compute engine for PromQL as for the TS source command.
/_prometheus/ endpoints for queries and discovery.