更新时间:2023-04-20 GMT+08:00
分享

ULB.Healthmonitor

模型说明

共享型负载均衡下的健康检查,一个Pool对应一个健康检查,一个健康检查管理多个弹性云服务器,支持对健康检查进行增加删除。

模型属性

表1 模型定义属性说明

属性

是否必选

描述

monitorPort

健康检查端口

参数类型:integer

取值说明:用户自定义,1~65535之间的整数,例如8089;未填写时默认使用弹性云服务器后端端口

取值约束: [1, 65535]

使用建议:根据规格按需选择

name

健康检查名称

参数类型:string

取值说明:用户自定义

取值约束:只能由英文字母、数字、下划线、中划线组成,且长度小于等于64个字符

使用建议:用户自定义

urlPath

用于健康检查的URI,type为HTTP时生效。建议对静态页面进行检查

参数类型:string

取值说明:用户自定义,例如“/”或者“/index.html”

取值约束:长度限制为1-80字符,必须以‘/’开头。只能使用字母、数字、‘-’、‘/’、‘.’、‘%’、‘?’、‘#’、‘&’、“_”、“=”这些字符。正则表达式:^/[0-9a-zA-Z-_?/.?#&=]*

使用建议:根据规格按需选择

delay

进行健康检查的时间间隔(秒)

参数类型:integer

取值说明:用户自定义,0~2147483647之间的整数,例如5

默认值:5

取值约束:可选 0-2147483647

使用建议:根据规格按需选择

httpMethod

用于健康检查的HTTP方法,type为HTTP时生效

参数类型:string

取值说明:GET | HEAD | POST | PUT | DELETE | TRACE | OPTIONS | CONNECT | PATCH

取值约束:可选 "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "OPTIONS", "CONNECT", "PATCH"

使用建议:根据规格按需选择

timeout

每次健康检查响应的最大超时时间(秒)

参数类型:integer

取值说明:用户自定义,0~2147483647之间的整数,例如10

默认值:10

取值约束:可选 0-2147483647

使用建议:根据规格按需选择

poolId

弹性云服务器组Id

参数类型:string

取值说明:弹性云服务器组Id

使用建议:ULB.Pool对象中以get_reference方法自动生成

maxRetries

判定健康检查结果变化的阈值。即,健康检查连续失败多少次后,将后端云服务器的健康检查状态由success改为fail或者由fail改为success

参数类型:integer

取值说明:用户自定义,1~10之间的整数,例如3

默认值:3

取值约束:可取1-10

使用建议:根据规格按需选择

expectedCode

用于判断后端弹性云服务器健康的HTTP状态码,type为HTTP时生效

参数类型:string

取值说明:用户自定义,例如200

取值约束:可选 1-250

使用建议:根据规格按需选择

type

健康检查协议

参数类型:string

取值说明:HTTP | TCP | HTTPS | PING | TLS-HELLO

取值约束:可取"TCP","HTTP","HTTPS","PING","TLS-HELLO"

使用建议:根据规格按需选择

关联关系

表2 关联关系说明

关系说明

关联节点

被包含关系

ULB.Pool

输出

属性

参数类型

描述

refID

string

健康检查实例ID

blueprint样例

tosca_definitions_version: huaweicloud_tosca_version_1_0
inputs:
  pool_protocol:
    description: '云服务器组协议, 与监听器协议保持一致'
  pool_listenerId:
    description: 所属的监听器ID
  pool_lbAlgorithm:
    description: 分配策略类型
  delay:
    description: 进行健康检查的时间间隔(秒)
  timeout:
    description: 每次健康检查响应的最大超时时间(秒)
  max_retries:
    description: 判定健康检查结果变化的阈值。即,健康检查连续失败多少次后,将后端云服务器的健康检查状态由success改为fail或者由fail改为success
  type:
    description: 健康检查协议
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
分享:

    相关文档

    相关产品