List All Upstreams

GET {{gateway}}/upstreams/:nameOrId/health?balancer_health=1

List All Upstreams konghq

  • Displays the health status for all Targets of a given Upstream, or for the whole Upstream, according to the perspective of a specific Kong node. Note that, being node-specific information, making this same request to different nodes of the Kong cluster may produce different results. For example, one specific node of the Kong cluster may be experiencing network issues, causing it to fail to connect to some Targets: these Targets will be marked as unhealthy by that node (directing traffic from this node to other Targets that it can successfully reach), but healthy to all others Kong nodes (which have no problems using that Target).

  • The data field of the response contains an array of Target objects. The health for each Target is returned in its health field:

    • If a Target fails to be activated in the balancer due to DNS issues, its status displays as DNS_ERROR.
    • When health checks are not enabled in the Upstream configuration, the health status for active Targets is displayed as HEALTHCHECKS_OFF.
    • When health checks are enabled and the Target is determined to be healthy, either automatically or manually, its status is displayed as HEALTHY. This means that this Target is currently included in this Upstream’s load balancer execution.
  • When a Target has been disabled by either active or passive health checks (circuit breakers) or manually, its status is displayed as UNHEALTHY. The load balancer is not directing any traffic to this Target via this Upstream. When the request query parameter balancer_health is set to 1, the data field of the response refers to the whole Upstream, and its health attribute is defined by the state of all of Upstream’s Targets, according to the field [health checker’s threshold][healthchecks.threshold].

AttributesMandatoryTypeDescription
name or idrequiredpathThe unique identifier or the name of the Upstream for which to display Target health.
balancer_healthoptionalqueryIf set to 1, Kong will return the health status of the whole Upstream.

Request Params

KeyDatatypeRequiredDescription
balancer_healthnumberIf set to 1, Kong will return the health status of the whole Upstream.

RESPONSES

status: OK

{"data":[{"id":"incididunt","created_at":3675253,"name":"aliqua veniam","algorithm":"non officia aliquip","hash_on":"laborum dolore ea pariatur","hash_fallback":"mollit anim sit","hash_on_cookie_path":"deserunt cillum","slots":-93720927,"healthchecks":{"threshold":0,"active":{"unhealthy":{"http_statuses":[429,404,500,501,502,503,504,505],"tcp_failures":0,"timeouts":0,"http_failures":0,"interval":0},"type":"http","http_path":"/","timeout":1,"healthy":{"successes":0,"interval":0,"http_statuses":[200,302]},"https_sni":"example.com","https_verify_certificate":true,"concurrency":10},"passive":{"unhealthy":{"http_failures":0,"http_statuses":[429,500,503],"tcp_failures":0,"timeouts":0},"healthy":{"http_statuses":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"successes":0},"type":"http"}},"tags":["culpa ei","enim"],"host_header":"labore proident elit irure incididunt"},{"id":"in minim ipsum dolore","created_at":66976784,"name":"","algorithm":"labore aliqua pariatur","hash_on":"esse ea in id","hash_fallback":"aliquip","hash_on_cookie_path":"incididunt eu eiusmod mollit","slots":-60979601,"healthchecks":{"threshold":0,"active":{"unhealthy":{"http_statuses":[429,404,500,501,502,503,504,505],"tcp_failures":0,"timeouts":0,"http_failures":0,"interval":0},"type":"http","http_path":"/","timeout":1,"healthy":{"successes":0,"interval":0,"http_statuses":[200,302]},"https_sni":"example.com","https_verify_certificate":true,"concurrency":10},"passive":{"unhealthy":{"http_failures":0,"http_statuses":[429,500,503],"tcp_failures":0,"timeouts":0},"healthy":{"http_statuses":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"successes":0},"type":"http"}},"tags":["consectetur qui eiusmod"],"host_header":"reprehenderit ad quis"},{"id":"fugiat elit non ut","created_at":-99389103,"name":"Ut adipisicing nisi laborum","algorithm":"ea","hash_on":"et sint","hash_fallback":"commo","hash_on_cookie_path":"deserunt consectetur c","slots":71186640,"healthchecks":{"threshold":0,"active":{"unhealthy":{"http_statuses":[429,404,500,501,502,503,504,505],"tcp_failures":0,"timeouts":0,"http_failures":0,"interval":0},"type":"http","http_path":"/","timeout":1,"healthy":{"successes":0,"interval":0,"http_statuses":[200,302]},"https_sni":"example.com","https_verify_certificate":true,"concurrency":10},"passive":{"unhealthy":{"http_failures":0,"http_statuses":[429,500,503],"tcp_failures":0,"timeouts":0},"healthy":{"http_statuses":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"successes":0},"type":"http"}},"tags":["ut ex officia consequat"],"host_header":"ex elit dolore enim"},{"id":"in Excepteur","created_at":-58732565,"name":"ipsum","algorithm":"anim exercitation voluptate","hash_on":"Lorem velit","hash_fallback":"pariatur do","hash_on_cookie_path":"est consequat nisi","slots":93978358,"healthchecks":{"threshold":0,"active":{"unhealthy":{"http_statuses":[429,404,500,501,502,503,504,505],"tcp_failures":0,"timeouts":0,"http_failures":0,"interval":0},"type":"http","http_path":"/","timeout":1,"healthy":{"successes":0,"interval":0,"http_statuses":[200,302]},"https_sni":"example.com","https_verify_certificate":true,"concurrency":10},"passive":{"unhealthy":{"http_failures":0,"http_statuses":[429,500,503],"tcp_failures":0,"timeouts":0},"healthy":{"http_statuses":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"successes":0},"type":"http"}},"tags":["do des","labore id ut","magna"],"host_header":"ut magna Excepteur"}],"next":"aliquip ipsum","node_id":"cbb297c0-14a9-46bc-ad91-1d0ef9b42df9"}