/sys/metrics
Restricted endpoint
The API path can only be called from the root namespace.The /sys/metrics
endpoint is used to get telemetry metrics for Vault.
Read telemetry metrics
This endpoint returns the telemetry metrics for Vault. It can be used by metrics collections systems like Prometheus that use a pull model for metrics collection.
Method | Path |
---|---|
GET | /sys/metrics |
Parameters
format
(string: "")
– Specifies the format used for the returned metrics. The default metrics format is JSON. Settingformat
toprometheus
will return the metrics in Prometheus format.
Sample request
When requesting metric information, only the active node in a Vault cluster
responds with data. Follower nodes ignore metric requests, which typically
results in a timeout response. For example, curl
command returns with the
error code 0
and no output.
Sample response
This response is only returned for a GET
request.