Updated on 2023-08-11 GMT+08:00

ULB.Healthmonitor

Element Description

The ULB.HealthMonitor element is a health check component of a shared load balancer. One pool corresponds to one HealthMonitor, and one HealthMonitor can manage multiple ECSs. You can add or delete the HealthMonitor as required.

Element Properties

Table 1 Property Description

Property

Required

Descripiton

monitorPort

No

Health check port

Type: integer

Value Description: Supports customization. The value is an integer between 1 and 65535, for example, 8089. If this parameter is left blank, the backend port of the ECS is used by default.

Value Constraint: Supports 1-65535

Suggestion: Set the value based on specifications and requirements.

name

No

Name of a health check job

Type: string

Value Description: Supports customization.

Value Constraint: The value supports a maximum of 64 characters and can only contain digits, letters, underscores (_), and hyphens (-).

Suggestion: Customize the value.

urlPath

No

URI for health check. This parameter is valid when the type is set to HTTP. You are advised to perform check on the static page.

Type: string

Value Description: Supports customization, for example, / or /index.html.

Value Constraint: The value must contain 1 to 80 characters and must start with a slash (/). It consists of letters, digits, and the following special characters: -/.%?#&_=In addition, it must meet the following requirement: ^/[0-9a-zA-Z-_?/.?#&=]*

Suggestion: Set the value based on specifications and requirements.

delay

Yes

Interval for health check (unit: s)

Type: integer

Value Description: Supports customization. The value is an integer between 0 and 2147483647, for example, 5.

Default: 5

Value Constraint: Supports 0-2147483647

Suggestion: Set the value based on specifications and requirements.

httpMethod

No

HTTP method for health check. This parameter is valid when the type is set to HTTP.

Type: string

Value Description: GET|HEAD|POST|PUT|DELETE|TRACE|OPTIONS|CONNECT|PATCH

Value Constraint: Supports "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "OPTIONS", "CONNECT", "PATCH"

Suggestion: Set the value based on specifications and requirements.

timeout

Yes

Maximum timeout duration for health check (unit: s)

Type: integer

Value Description: Supports customization. The value is an integer between 0 and 2147483647, for example, 10.

Default: 10

Value Constraint: Supports 0-2147483647

Suggestion: Set the value based on specifications and requirements.

poolId

Yes

ECS group ID

Type: string

Value Description: Indicates the ECS group ID.

Suggestion: Use the get_reference function to automatically generate the value.

maxRetries

Yes

Threshold for determining whether to change the health check status. That is, change the health check status of the backend ECS from success to fail upon certain consecutive failures, and from fail to success upon certain consecutive successes.

Type: integer

Value Description: Supports customization. The value is an integer between 1 and 10, for example, 3.

Default: 3

Value Constraint: Supports 1-10

Suggestion: Set the value based on specifications and requirements.

expectedCode

No

HTTP status code used to determine the health status of a backend ECS. This parameter is valid when the type is set to HTTP.

Type: string

Value Description: Supports customization. For example, 200.

Value Constraint: Supports 1-250

Suggestion: Set the value based on specifications and requirements.

type

Yes

Health check protocol

Type: string

Value Description: HTTP|TCP|HTTPS|PING|TLS-HELLO

Value Constraint: Supports"TCP","HTTP","HTTPS","PING","TLS-HELLO"

Suggestion: Set the value based on specifications and requirements.

Relationships Between Elements

Table 2 Relationship description

Description

Target

ContainedIn

ULB.Pool

Return Value

Property

Type

Description

refID

string

ID of a health check instance

Blueprint Example

tosca_definitions_version: huaweicloud_tosca_version_1_0 
 inputs: 
   pool_protocol: 
     description: 'ECS group protocol, which must be consistent with the listener protocol' 
   pool_listenerId: 
     description: Belonged listener ID 
   pool_lbAlgorithm: 
     description: Allocation policy type 
   delay: 
     description: Interval for health check (unit: s) 
   timeout: 
     description: Maximum timeout duration for health check (unit: s) 
   max_retries: 
     description: Threshold for determining whether to change the health check status. That is, change the health check status of the backend ECS from success to fail upon certain consecutive failures, and from fail to success upon certain consecutive successes. 
     description: Health check protocol 
 node_templates: 
   pool: 
     type: HuaweiCloud.ULB.Pool 
     properties: 
       protocol: 
         get_input: pool_protocol 
       listenerId: 
         get_input: pool_listenerId 
       lbAlgorithm: 
         get_input: pool_lbAlgorithm 
   health-monitor: 
     type: HuaweiCloud.ULB.Healthmonitor 
     properties: 
       delay: 
         get_input: delay 
       timeout: 
         get_input: timeout 
       maxRetries: 
         get_input: max_retries 
       type: 
         get_input: type 
       poolId: 
         get_reference: pool 
     requirements: 
       - poolId: 
           node: pool