PromQL reference
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
GA
9.5+
…
Generally available since 9.5
Preview in 9.4
The Prometheus Query Language (PromQL) is a functional query language to select and aggregate metrics.
Elasticsearch 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.
Elasticsearch supports PromQL in two ways: through a Prometheus-compatible HTTP API (for Prometheus-compatible clients) and as a PROMQL source command inside piped ES|QL queries that allow post-processing through regular ES|QL.
When you use the Prometheus-compatible HTTP API or embed PromQL in an ES|QL query through the PROMQL source command, Elasticsearch parses PromQL into ES|QL logical plans and evaluates those plans against TSDS metrics.
Elasticsearch uses the same ES|QL compute engine for PromQL as for the TS source command.
- Get started: Ingest sample Prometheus metrics and query them with PromQL through the HTTP API and ES|QL.
- HTTP API: Prometheus-compatible
/_prometheus/endpoints for queries and discovery. - Functions: PromQL function reference organized by category, including Elasticsearch-specific differences from Prometheus.
- Operators: PromQL operator reference organized by category, including Elasticsearch-specific differences from Prometheus.
- Prometheus data source in Grafana: Use Elasticsearch as a Prometheus data source in Grafana for dashboards, autocomplete, and Metrics Drilldown.
- Prometheus compatibility: What Elasticsearch supports, what isn't supported yet, and what behaves differently from Prometheus, for both PromQL and the HTTP API.