• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. LBaas
  6. Create health monitor

Create health monitor

Function Description

This interface is used to create a health monitor.

Interface Format

Method

URI

Description

POST

/v2.0/lbaas/healthmonitors

Creates a health monitor.

Restrictions

  • The security group can allow the traffic from network segment 100.125.0.0/16 to pass.
  • The health monitor type can be PING, TCP, HTTP, or HTTPS. The DR mode supports only PING and TCP, and the non-DR mode supports only TCP and HTTP. The HTTPS type is valid only when the non-DR mode is used, and the listener protocol is TCP.

The value of parameter admin_state_up must be set to true.

Request Parameter

Parameter

Type

Mandatory

Description

healthmonitor

Dict

Yes

Specifies the health check. For details, see Table 6.

The mandatory fields include typedelaytimeoutmax_retries, and pool_id.

Response Parameter

Parameter

Type

Mandatory

Description

healthmonitor

Dict

Yes

Specifies the health check. For details, see Table 6.

Request Example

POST /v2.0/lbaas/healthmonitors
{
  "healthmonitor": {
    "admin_state_up": true,
    "pool_id": "bb44bffb-05d9-412c-9d9c-b189d9e14193",
    "delay": "10",
    "max_retries": "10",
    "timeout": "10",
    "type": "HTTP"
  }
}

Response Example

{
  "healthmonitor": {
    "name": "",
    "admin_state_up": true,
    "tenant_id": "145483a5107745e9b3d80f956713e6a3",
    "delay": 10,
    "expected_codes": "200",
    "max_retries": 10,
    "http_method": "GET",
    "timeout": 10,
    "pools": [
      {
        "id": "bb44bffb-05d9-412c-9d9c-b189d9e14193"
      }
    ],
    "url_path": "/",
    "type": "HTTP",
    "id": "2dca3867-98c5-4cde-8f2c-b89ae6bd7e36"
  }
}

Error Code

See section Return Code Processing.