docs-v2/content/influxdb/cloud/reference/flux/stdlib/experimental/prometheus/histogramquantile.md

974 B

title description menu weight
prometheus.histogramQuantile() function 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.
influxdb_cloud_ref
name parent
prometheus.histogramQuantile Prometheus
401

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.

Function type: Aggregate

import "experimental/prometheus"

prometheus.histogramQuantile(
  quantile: 0.99
)

Parameters

quantile

A value between 0.0 and 1.0 indicating the desired quantile.

Data type: Float

Examples

Calculate the 99th quantile in Prometheus data

import "experimental/prometheus"

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