Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Network Load Balancer
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Network load balancers
      • Create a network load balancer
      • Create an internal network load balancer
      • Start a load balancer
      • Stop a load balancer
      • Delete a load balancer
      • Check target health statuses
      • Add a listener
      • Delete a listener
    • Target groups
      • Create a target group
      • Attach a target group to a load balancer
      • Detach a target group from a load balancer
      • Delete a target group
  • Concepts
    • Network load balancer
    • Internal network load balancer
    • Listener
    • Targets and groups
    • Resource health checks
    • Quotas and limits
  • Best practices for using the service
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • NetworkLoadBalancerService
      • TargetGroupService
      • OperationService
    • REST
      • Overview
      • NetworkLoadBalancer
        • Overview
        • addListener
        • attachTargetGroup
        • create
        • delete
        • detachTargetGroup
        • get
        • getTargetStates
        • list
        • listOperations
        • removeListener
        • start
        • stop
        • update
      • TargetGroup
        • Overview
        • addTargets
        • create
        • delete
        • get
        • list
        • listOperations
        • removeTargets
        • update
      • Operation
        • Overview
        • get
  • Questions and answers
  1. Step-by-step instructions
  2. Network load balancers
  3. Check target health statuses

Check target health statuses

    CLI

    If you don't have the Yandex.Cloud command line interface yet, install it.

    The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

    1. See the description of the CLI's get attached resource status command:

      $ yc load-balancer network-load-balancer target-states --help
      
    2. Get a list of all network load balancers:

      $ yc load-balancer network-load-balancer list
      +----------------------+--------------------+-------------+----------+----------------+------------------------+----------+
      |          ID          |        NAME        |  REGION ID  |   TYPE   | LISTENER COUNT | ATTACHED TARGET GROUPS |  STATUS  |
      +----------------------+--------------------+-------------+----------+----------------+------------------------+----------+
      ...
      | b7r97ah2jn5rmo6k1dsk | test-load-balancer | ru-central1 | EXTERNAL |              1 | b7roi767je4c574iivrk   |  ACTIVE  |
      ...
      +----------------------+--------------------+-------------+----------+----------------+------------------------+----------+
      
    3. Choose the ID of the load balancer and the target group that is attached to it.

    4. Request the status of the target group resources:

      $ yc load-balancer network-load-balancer target-states b7r97ah2jn5rmo6k1dsk --target-group-id b7roi767je4c574iivrk
      +----------------------+-----------+-----------+
      |      SUBNET ID       |  ADDRESS  |  STATUS   |
      +----------------------+-----------+-----------+
      | e9bc0iisdf7b00b7d4v0 | 10.10.0.4 | UNHEALTHY |
      | e9bc0iisdf7b00b7d4v0 | 10.10.0.7 | UNHEALTHY |
      +----------------------+-----------+-----------+
      
    Language / Region
    Careers
    Privacy policy
    Terms of use
    Brandbook
    © 2021 Yandex.Cloud LLC