Get Prometheus label values
Get the sorted deduplicated values of one label on the matching time series.
Label names can use the OpenMetrics U__ encoding for characters that are not valid in Prometheus label names.
An unknown label returns an empty list.
The endpoint mirrors the Prometheus /api/v1/label/{name}/values endpoint.
Required privileges
read
Path parameters
-
indexstringoptional -
An index expression that restricts which indices are considered, for example
metrics-generic.prometheus-*. If you omit it, the default expressionmetrics-*is used. Only indices withindex.mode: time_seriesare considered. An alias is accepted and index privileges are checked against that alias name.Leave it out to use
/_prometheus/api/v1/label/{name}/values.
Query parameters
Responses
The request is not valid after the handler has started.
A failure while reading parameters is the standard Elasticsearch { error, status } body instead.
-
errorTypeenumrequired -
The Prometheus error type, from the HTTP status:
400isbad_data;503,408, and504aretimeout; every other status isexecution.Supported values include:
bad_data: HTTP400. The request or expression is not valid.timeout: HTTP503,408, or504. The query timed out or a gateway timed out.execution: Every other status, including HTTP403and500.
-
Values:
bad_datatimeoutexecution
The caller is not allowed to run the query.
-
errorTypeenumrequired -
The Prometheus error type, from the HTTP status:
400isbad_data;503,408, and504aretimeout; every other status isexecution.Supported values include:
bad_data: HTTP400. The request or expression is not valid.timeout: HTTP503,408, or504. The query timed out or a gateway timed out.execution: Every other status, including HTTP403and500.
-
Values:
bad_datatimeoutexecution
The query ran, but the response could not be written.
-
errorTypeenumrequired -
The Prometheus error type, from the HTTP status:
400isbad_data;503,408, and504aretimeout; every other status isexecution.Supported values include:
bad_data: HTTP400. The request or expression is not valid.timeout: HTTP503,408, or504. The query timed out or a gateway timed out.execution: Every other status, including HTTP403and500.
-
Values:
bad_datatimeoutexecution