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

KeyDatatypeRequiredDescription
statestringThe state query parameter allows the caller to filter by active or dropped targets, (e.g., state=active, state=dropped, state=any).

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

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":[]}}