Loading

PromQL functions

These functions are based on the Prometheus query functions. Refer to the Prometheus documentation for the full semantics, and note any Elasticsearch-specific differences called out per function.

Functions that take a range vector and return an instant vector.

Functions that aggregate an instant vector across series.

Functions that operate on histogram metrics.

Mathematical, trigonometric, and rounding functions.

Functions that extract date and time components from timestamps.

Functions that convert between scalars and instant vectors.

The following PromQL functions are recognized but not yet supported in Elasticsearch. Using them returns a client error (4xx):

  • absent
  • bottomk
  • changes
  • count_values
  • group
  • histogram_avg
  • histogram_count
  • histogram_fraction
  • histogram_stddev
  • histogram_stdvar
  • histogram_sum
  • holt_winters
  • label_join
  • label_replace
  • mad_over_time
  • predict_linear
  • resets
  • sort
  • sort_desc
  • timestamp
  • topk