Set Target As Unhealthy

POST {{gateway}}/upstreams/:upstreamNameOrId/targets/:targetOrID/unhealthy

Set Target As Unhealthy konghq

  • Set the current health status of a target in the load balancer to “unhealthy” in the entire Kong cluster. This sets the “unhealthy” status to all addresses resolved by this target.

  • This endpoint can be used to manually disable a target and have it stop responding to requests. Upstreams only forward requests to healthy nodes, so this call tells Kong to start skipping this target.

  • This call resets the health counters of the health checkers running in all workers of the Kong node, and broadcasts a cluster-wide message so that the “unhealthy” status is propagated to the whole Kong cluster.

  • Active health checks continue to execute for unhealthy targets. Note that if active health checks are enabled and the probe detects that the target is actually healthy, it will automatically re-enable it again. To permanently remove a target from the balancer, you should delete a target instead.

AttributesMandatoryTypeDescription
upstream name or idrequiredpathThe unique identifier or the name of the upstream.
target or idrequiredpathThe host/port combination element of the target to set as unhealthy, or the id of an existing target entry.