Returns current target discovery.
GET {{baseUrl}}/targets?state=dropped
Both the active and dropped targets are part of the response by default. labels
represents the label set after relabelling has occurred. discoveredLabels
represent the unmodified labels retrieved during service discovery before relabelling has occurred.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
state | string | The state query parameter allows the caller to filter by active or dropped targets, (e.g., state=active , state=dropped , state=any ). | |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: Created
{"status":"success","data":{"activeTargets":[{"discoveredLabels":{"__address__":"127.0.0.1:9090","__metrics_path__":"/metrics","__scheme__":"http","job":"prometheus"},"labels":{"instance":"127.0.0.1:9090","job":"prometheus"},"scrapePool":"prometheus","scrapeUrl":"http://127.0.0.1:9090/metrics","globalUrl":"http://example-prometheus:9090/metrics","lastError":"","lastScrape":"2017-01-17T14:07:44.723Z","lastScrapeDuration":50688943,"health":"up"}],"droppedTargets":[]}}