Get Prometheus metric metadata

  • GET /_prometheus/{index}/api/v1/metadata
  • GET /_prometheus/api/v1/metadata
Auth

Get the type and unit of the metrics in time series data streams, over a fixed 24-hour lookback. The help field is always an empty string. The endpoint mirrors the Prometheus /api/v1/metadata endpoint, without match[], start and end.

Required privileges

Index
read

Path parameters

index string optional

An index expression that restricts which indices are considered, for example metrics-generic.prometheus-*. If you omit it, the default expression metrics-* is used. Only indices with index.mode: time_series are considered.

Leave it out to use /_prometheus/api/v1/metadata.

Query parameters

metric string

Restricts the response to one metric name.

limit number

The maximum number of distinct metrics to return. 0 means no limit from the request.

limit_per_metric number

The maximum number of metadata entries to return for each metric. 0 means no limit from the request.

Responses

application/json
status string required

The status of the request: success.

data map string to object required

The metadata entries, keyed by metric name.

warnings string[]

Warnings, such as a notice that the results were truncated because of limit.