Returns target metadata
GET {{baseUrl}}/targets/metadata?match_target=irure&metric=irure&limit=-73947193.65422273
The following endpoint returns metadata about metrics currently scraped from targets. This is experimental and might change in the future.
The data
section of the query result consists of a list of objects that contain metric metadata and the target label set.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
match_target | string | Label selectors that match targets by their label sets. All targets are selected if left empty. |
Example: match_target={job="prometheus"}
|
| metric
| string | | A metric name to retrieve metadata for. All metric metadata is retrieved if left empty.
Example: metric=go_goroutines
|
| limit
| string | | Maximum number of targets to match.
Example: limit=2
|
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: Created
{"status":"success","data":[{"target":{"instance":"127.0.0.1:9090","job":"prometheus"},"type":"gauge","help":"Number of goroutines that currently exist.","unit":""},{"target":{"instance":"127.0.0.1:9091","job":"prometheus"},"type":"gauge","help":"Number of goroutines that currently exist.","unit":""}]}