Documentation

prometheus.histogramQuantile() function

Flux 0.51.0+

The prometheus.histogramQuantile() function is experimental and subject to change at any time. By using this function, you accept the risks of experimental functions.

The prometheus.histogramQuantile() function calculates quantiles on a set of values assuming the given histogram data is scraped or read from a Prometheus data source. prometheus.histogramQuantile() is an aggregate function.

import "experimental/prometheus"

prometheus.histogramQuantile(
  quantile: 0.99
)

Parameters

quantile

A value between 0.0 and 1.0 indicating the desired quantile.

tables

Input data. Default is piped-forward data (<-).

Examples

Calculate the 99th quantile in Prometheus data

import "experimental/prometheus"

prometheus.scrape(url: "https://example-url.com/metrics")
  |> prometheus.histogramQuantile(quantile: 0.99)

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.