Get Prometheus metric metadata
- GET /_prometheus/{index}/api/v1/metadata
- GET /_prometheus/api/v1/metadata
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
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/metadata.
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