文档首页/ 弹性负载均衡 ELB/ API参考/ API(V3)/ 后端服务器/ 查询后端服务器检测任务的结果
更新时间:2024-12-13 GMT+08:00
分享

查询后端服务器检测任务的结果

功能介绍

查询后端服务器检测任务的结果。

调用方法

请参见如何调用API

URI

GET /v3/{project_id}/elb/members/check/jobs/{job_id}

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释:项目ID。

job_id

String

参数解释:创建后端服务器检测任务的接口返回的job_id。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

参数解释:IAM鉴权Token。

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

member_check

MemberCheckJobInfo object

参数解释:后端服务器检测任务结果。

request_id

String

参数解释:请求ID。

注:自动生成 。

表4 MemberCheckJobInfo

参数

参数类型

描述

status

String

参数解释:processed检查完成,processing检查中,failed检查失败

result

MemberCheckJobResult object

参数解释:后端服务器检测任务各检查项的检测结果。

created_at

String

参数解释:任务创建时间。

updated_at

String

参数解释:任务更新时间

job_id

String

参数解释:任务ID。

check_item_total_num

Integer

参数解释:检查项总个数

check_item_finished_num

Integer

参数解释:已检查完成的检查项个数

listener_id

String

参数解释:后端服务器所关联的监听器,查询在该监听器下后端服务器的状态。

member_id

String

参数解释:后端服务器ID。

表5 MemberCheckJobResult

参数

参数类型

描述

config

MemberCheckJobResultGroup object

参数解释:配置检查

acl

MemberCheckJobResultGroup object

参数解释:ACL规则检查

security_group

MemberCheckJobResultGroup object

参数解释:安全组规则检查

表6 MemberCheckJobResultGroup

参数

参数类型

描述

check_result

Boolean

参数解释:检查结果,true表示检查通过,false为检查不通过。

check_items

Array of MemberCheckJobResultItem objects

参数解释:分组检查项汇总。

check_status

String

参数解释:processed检查完成,processing检查中,failed检查失败

表7 MemberCheckJobResultItem

参数

参数类型

描述

name

String

参数解释:检查项名称

reason

String

参数解释:异常原因

severity

String

参数解释:重要级别,分为Major(严重)和Tips(提示)

subject

String

参数解释:检查类别,config表示配置检查

jobId

String

参数解释:任务ID。

reason_template

String

参数解释:异常原因模板

reason_params

Array of strings

参数解释:异常结果变量参数表,用于结合异常原因模板动态生成异常原因

请求示例

查询后端服务器检测任务的结果

POST https://{ELB_Endpoint}/v3/04dd36f964000fe22f9ac00bc85b1a1d/elb/members/check/jobs/04a9bc65-b75b-478d-b4d6-e693bb61dd35

响应示例

状态码: 200

操作正常返回。

{
  "member_check" : {
    "status" : "processed",
    "result" : {
      "config" : {
        "check_result" : true,
        "check_items" : [ {
          "name" : "check_hc_config_port",
          "reason" : null,
          "severity" : "Tips",
          "subject" : "config",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck {$hm_id}'s protocolPort {$protocol_port} is different from member port {$member_port}",
          "reason_params" : [ ]
        } ],
        "check_status" : "processed"
      },
      "acl" : {
        "check_result" : true,
        "check_items" : [ {
          "name" : "acl_check_hc_protocol_egress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "networkAcl",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck {$hm_id}'s protocol is {$hc_protocol}, but the transport layer protocol corresponding to the protocol {$trans_protocol} is not allowed by ACL {$acl_id} egress policies",
          "reason_params" : [ ]
        }, {
          "name" : "acl_check_hc_dest_port_egress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "networkAcl",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck destination port may not allowed by ACL {$acl_id} egress policies, it is recommended to open all destination ports",
          "reason_params" : [ ]
        }, {
          "name" : "acl_check_hc_dest_ip_egress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "networkAcl",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck destination IP {$dest_ip} is not allowed by ACL {$acl_id} egress policies",
          "reason_params" : [ ]
        }, {
          "name" : "acl_check_hc_source_port_egress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "networkAcl",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck source port {$source_port} is not allowed by ACL {$acl_id} egress policies",
          "reason_params" : [ ]
        }, {
          "name" : "acl_check_hc_source_ip_egress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "networkAcl",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck source IP {$source_ip} is not allowed by ACL {$acl_id} egress policies",
          "reason_params" : [ ]
        }, {
          "name" : "acl_check_hc_protocol_ingress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "networkAcl",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck {$hm_id}'s protocol is {$hc_protocol}, but the transport layer protocol corresponding to the protocol {$trans_protocol} is not allowed by ACL {$acl_id} ingress policies",
          "reason_params" : [ ]
        }, {
          "name" : "acl_check_hc_dest_port_ingress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "networkAcl",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck destination port {$dest_port} is not allowed by ACL {$acl_id} ingress policies",
          "reason_params" : [ ]
        }, {
          "name" : "acl_check_hc_dest_ip_ingress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "networkAcl",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck destination IP {$dest_ip} is not allowed by ACL {$acl_id} ingress policies",
          "reason_params" : [ ]
        }, {
          "name" : "acl_check_hc_source_port_ingress",
          "reason" : null,
          "severity" : "Tips",
          "subject" : "networkAcl",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck source port may not allowed by ACL {$acl_id} ingress policies, it is recommended to open all destination ports",
          "reason_params" : [ ]
        }, {
          "name" : "acl_check_hc_source_ip_ingress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "networkAcl",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck source IP {$source_ip} is not allowed by ACL {$acl_id} ingress policies",
          "reason_params" : [ ]
        } ],
        "check_status" : "processed"
      },
      "security_group" : {
        "check_result" : true,
        "check_items" : [ {
          "name" : "security_group_check_hc_protocol_egress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "securityGroup",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck {$hm_id}'s protocol is {$hc_protocol}, but the transport layer protocol corresponding to the protocol {$transport_protocol} is not allowed by securityGroup {$security_group_id} egress rules",
          "reason_params" : [ ]
        }, {
          "name" : "security_group_check_hc_port_egress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "securityGroup",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck dest port {$dest_port} is not allowed by securityGroup {$security_group_id} egress rules",
          "reason_params" : [ ]
        }, {
          "name" : "security_group_check_hc_source_ip_egress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "securityGroup",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck source IP {$source_ip} is not allowed by securityGroup {$security_group_id} egress rules",
          "reason_params" : [ ]
        }, {
          "name" : "security_group_check_hc_protocol_ingress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "securityGroup",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck {$hm_id}'s protocol is {$hc_protocol}, but the transport layer protocol corresponding to the protocol {$transport_protocol} is not allowed by securityGroup {$security_group_id} ingress rules",
          "reason_params" : [ ]
        }, {
          "name" : "security_group_check_hc_port_ingress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "securityGroup",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck dest port {$dest_port} is not allowed by securityGroup {$security_group_id} ingress rules",
          "reason_params" : [ ]
        }, {
          "name" : "security_group_check_hc_source_ip_ingress",
          "reason" : null,
          "severity" : "Major",
          "subject" : "securityGroup",
          "jobId" : "919221ce-0011-4558-81ca-2866e6e68a27",
          "reason_template" : "healthCheck source IP {$source_ip} is not allowed by securityGroup {$security_group_id} ingress rules",
          "reason_params" : [ ]
        } ],
        "check_status" : "processed"
      }
    },
    "created_at" : "2024-12-08T07:55:04Z",
    "updated_at" : "2024-12-08T07:55:05Z",
    "job_id" : "919221ce-0011-4558-81ca-2866e6e68a27",
    "check_item_total_num" : 17,
    "check_item_finished_num" : 17,
    "listener_id" : "b445cc43-02d7-4863-9481-283b7fb1c222",
    "member_id" : "02272819-5655-4c6b-892b-105604f6aea0"
  },
  "request_id" : "5980e624-dc64-46b9-8d74-e5834655dab5"
}

状态码

状态码

描述

200

操作正常返回。

错误码

请参见错误码

相关文档