Updated on 2023-12-18 GMT+08:00

Configuring a Health Check

API Format

Method

URI

Description

POST

/v2.0/lbaas/healthmonitors

Configures a health check.

Constraints

  • The security group must have rules to allow access from the 100.125.0.0/16 network segment.
  • The value of admin_state_up must be true.
  • To use UDP for health checks, the backend server group must use UDP as backend protocol.

Procedure

  1. Set the request header. Set the header in Postman and place the obtained token in the header.

  2. Under Body, set the request body.

  3. Enter the URL.

    https://elb.cn-east-2.myhuaweicloud.com/v2.0/lbaas/healthmonitors

  4. Send the request. Set the POST request method and click Send to wait for response from the server.

    {
        "healthmonitor": {
            "monitor_port": null,
            "name": "",
            "admin_state_up": true,
            "tenant_id": "0d0bf0e8fb564cc9abbe526dbdca9248",
            "delay": 10,
            "expected_codes": "200",
            "max_retries": 10,
            "http_method": "GET",
            "timeout": 10,
            "pools": [
                {
                    "id": "752c3773-a046-4966-a5d6-0ad7f9a49d0a"
                }
            ],
            "url_path": "/",
            "type": "HTTP",
            "id": "9b6d7438-a6eb-4d49-ae77-3c130e3b7ae8"
        }
    }

Sample Code

Request body in 2

{ 
  "healthmonitor": { 
    "admin_state_up": true, 
    "pool_id": "752c3773-a046-4966-a5d6-0ad7f9a49d0a", 
    "delay": "10", 
    "max_retries": "10", 
    "timeout": "10", 
    "type": "HTTP" 
  } 
}