All Products
Search
Document Center

Server Load Balancer:GetListenerHealthStatus

Last Updated:Sep 04, 2026

Queries the health check status of a listener and its forwarding rules.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

alb:GetListenerHealthStatus

get

*LoadBalancer

acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ListenerId

string

Yes

The listener ID of the instance.

lsn-o4u54y73wq7b******

IncludeRule

boolean

No

Specifies whether to include the health check results of forwarding rules. Valid values:

  • true: Include the results.

  • false (default): Do not include the results.

true

NextToken

string

No

Specifies whether there is a token for the next query. Valid values:

  • For the first query or when no next query exists, leave this parameter empty.

  • If a next query exists, set this parameter to the NextToken value returned by the previous API call.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

No

The maximum number of entries to return per page in a paginated query. Valid values: 1 to 30. Default value: 20.

20

Response elements

Element

Type

Description

Example

object

Queries the health check status of a listener and the forwarding rules in its corresponding configurations.

ListenerHealthStatus

array<object>

The health check status list of server groups associated with the listener.

array<object>

The health check status structure of server groups associated with the listener.

ListenerId

string

The listener ID of the instance.

lsn-o4u54y73wq7b******

ListenerPort

integer

The listener port.

80

ListenerProtocol

string

The listener protocol.

http

ServerGroupInfos

array<object>

The server group information.

array<object>

The server group information.

HealthCheckEnabled

string

The health check status. Valid values: on: Health check is enabled.

on

NonNormalServers

array<object>

The list of backend servers in abnormal state.

array<object>

The list of backend servers in abnormal state.

Port

integer

The backend server port.

90

Reason

object

The reason for the abnormal state.

ActualResponse

string

The actual response code returned by the backend server, such as 302.

Note

This value is returned only when ReasonCode is RESPONSE_MISMATCH.

302

ExpectedResponse

string

The expected response code from the backend server.

Valid values: HTTP_2xx, HTTP_3xx, HTTP_4xx, and HTTP_5xx. Multiple response codes are separated by commas (,).

Note

This value is returned only when ReasonCode is RESPONSE_MISMATCH.

HTTP_2xx

ReasonCode

string

The detailed reason when Status is abnormal. Currently, only HTTP and HTTPS listeners and forwarding rules support viewing abnormal status reasons:

  • CONNECT_TIMEOUT: The Server Load Balancer (SLB) health check timed out when establishing a connection to the backend server.

  • CONNECT_FAILED: The SLB health check failed to establish a connection to the backend server.

  • RECV_RESPONSE_FAILED: The SLB health check failed to receive a response from the backend server.

  • RECV_RESPONSE_TIMEOUT: The SLB health check timed out when receiving a response from the backend server.

  • SEND_REQUEST_FAILED: The SLB health check failed to send a request to the backend server.

  • SEND_REQUEST_TIMEOUT: The SLB health check timed out when sending a request to the backend server.

  • RESPONSE_FORMAT_ERROR: The SLB health check received a response in an incorrect format from the backend server.

  • RESPONSE_MISMATCH: The response code received from the backend server during the SLB health check did not match the expected response code.

RESPONSE_MISMATCH

ServerId

string

The backend server ID.

i-uf62h8v******

ServerIp

string

The backend server IP address.

192.168.8.10

Status

string

The health check status. Valid values:

  • Initial: Initializing. The SLB instance has health check configured, but no data is available.

  • Unhealthy: Unhealthy. The backend server has continuously reported an unhealthy state.

  • Unused: Not in use. The weight of the backend server is 0, or cross-zone load balancing is disabled and the backend server is not in the same zone as the Application Load Balancer (ALB) instance.

  • Unavailable: Not enabled. Health check is not enabled.

Initial

ServerGroupId

string

The associated server group ID.

sgp-8ilqs4axp6******

ActionType

string

The server group usage type. Valid values:

  • ForwardGroup: Forward to the server group.

  • TrafficMirror: Mirror traffic to the server group.

TrafficMirror

ServerCount

integer

The number of servers in the server group.

1

RequestId

string

The request ID.

CEF72CEB-54B6-4AE8-B225-F876F******

RuleHealthStatus

array<object>

The health status list of forwarding rules.

array<object>

The health status structure of a forwarding rule.

RuleId

string

The forwarding rule ID.

rule-hp34s2h0xx1ht4nwo****

ServerGroupInfos

array<object>

The list of server groups.

array<object>

The server group structure.

HealthCheckEnabled

string

The health check status. Valid values: on: Health check is enabled.

on

NonNormalServers

array<object>

The list of backend servers in abnormal state.

array<object>

The list of backend servers in abnormal state.

Port

integer

The backend server port.

90

Reason

object

The reason for the abnormal state.

ActualResponse

string

The actual response code returned by the backend server, such as 302.

Note

This value is returned only when ReasonCode is RESPONSE_MISMATCH.

302

ExpectedResponse

string

The expected response code from the backend server.

Valid values: HTTP_2xx, HTTP_3xx, HTTP_4xx, and HTTP_5xx. Multiple response codes are separated by commas (,).

Note

This value is returned only when ReasonCode is RESPONSE_MISMATCH.

HTTP_2xx

ReasonCode

string

The detailed reason when Status is abnormal. Currently, only HTTP and HTTPS listeners and forwarding rules support viewing abnormal status reasons:

  • CONNECT_TIMEOUT: The Server Load Balancer (SLB) health check timed out when establishing a connection to the backend server.

  • CONNECT_FAILED: The SLB health check failed to establish a connection to the backend server.

  • RECV_RESPONSE_FAILED: The SLB health check failed to receive a response from the backend server.

  • RECV_RESPONSE_TIMEOUT: The SLB health check timed out when receiving a response from the backend server.

  • SEND_REQUEST_FAILED: The SLB health check failed to send a request to the backend server.

  • SEND_REQUEST_TIMEOUT: The SLB health check timed out when sending a request to the backend server.

  • RESPONSE_FORMAT_ERROR: The SLB health check received a response in an incorrect format from the backend server.

  • RESPONSE_MISMATCH: The response code received from the backend server during the SLB health check did not match the expected response code.

RESPONSE_MISMATCH

ServerId

string

The backend server ID.

i-uf62h8v******

ServerIp

string

The backend server group IP address.

192.168.2.11

Status

string

The health check status. Valid values:

  • Initial: Initializing. The SLB instance has health check configured, but no data is available.

  • Unhealthy: Unhealthy. The backend server has continuously reported an unhealthy state.

  • Unused: Not in use. The weight of the backend server is 0, or cross-zone load balancing is disabled and the backend server is not in the same zone as the ALB instance.

  • Unavailable: Not enabled. Health check is not enabled.

Initial

ServerGroupId

string

The associated server group ID.

sgp-8ilqs4axp6******

ActionType

string

The server group usage type.

TrafficMirror

ServerCount

integer

The number of servers in the server group.

1

NextToken

string

Indicates whether a next query token exists. Valid values:

  • If NextToken is empty, no next query exists.

  • If NextToken is returned, the value indicates the token for the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

Examples

Success response

JSON format

{
  "ListenerHealthStatus": [
    {
      "ListenerId": "lsn-o4u54y73wq7b******",
      "ListenerPort": 80,
      "ListenerProtocol": "http",
      "ServerGroupInfos": [
        {
          "HealthCheckEnabled": "on",
          "NonNormalServers": [
            {
              "Port": 90,
              "Reason": {
                "ActualResponse": "302",
                "ExpectedResponse": "HTTP_2xx",
                "ReasonCode": "RESPONSE_MISMATCH"
              },
              "ServerId": "i-uf62h8v******",
              "ServerIp": "192.168.8.10",
              "Status": "Initial"
            }
          ],
          "ServerGroupId": "sgp-8ilqs4axp6******",
          "ActionType": "TrafficMirror",
          "ServerCount": 1
        }
      ]
    }
  ],
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876F******",
  "RuleHealthStatus": [
    {
      "RuleId": "rule-hp34s2h0xx1ht4nwo****",
      "ServerGroupInfos": [
        {
          "HealthCheckEnabled": "on",
          "NonNormalServers": [
            {
              "Port": 90,
              "Reason": {
                "ActualResponse": "302",
                "ExpectedResponse": "HTTP_2xx",
                "ReasonCode": "RESPONSE_MISMATCH"
              },
              "ServerId": "i-uf62h8v******",
              "ServerIp": "192.168.2.11",
              "Status": "Initial"
            }
          ],
          "ServerGroupId": "sgp-8ilqs4axp6******",
          "ActionType": "TrafficMirror",
          "ServerCount": 1
        }
      ]
    }
  ],
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****"
}

Error codes

HTTP status code

Error code

Error message

Description

403 Forbidden.LoadBalancer Authentication is failed for %s. Authentication is failed for %s.
404 ResourceNotFound.LoadBalancer The specified resource %s is not found. The specified resource %s is not found.
404 ResourceNotFound.Listener The specified resource %s is not found. The listener does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.