调用ListClusterServiceComponentHealthInfo接口,获取集群指定服务对应的组件健康信息列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String ListClusterServiceComponentHealthInfo

系统规定参数。取值:ListClusterServiceComponentHealthInfo。

ClusterId String C-F32FB31D8295****

集群ID。您可以调用ListClusters查看集群的ID。

RegionId String cn-hangzhou

地域ID。您可以调用DescribeRegions查看最新的阿里云地域列表。

ServiceName String TEZ

服务名称。

返回数据

名称 类型 示例值 描述
ClusterId String C-F32FB31D8295****

集群ID。

HealthInfoList Array of HealthInfo

健康信息列表。

HealthInfo
AgentHeartBeatLostNum Integer 0

EMR的管控Agent心跳不正常的主机个数。

ComponentName String ResourceManager

组件名称。

CreatedTime Long 0

保留字段。

HealthDetailList Array of HealthDetail

健康详情信息。

HealthDetail
HealthRuleParam Struct

检查规格信息。

Component String Ecm-Agent

组件名。

HostNames String emr-worker-1

主机名。

Pass String ""

规则监测通过信息。

RuleDescription String Agent信息监测

规则描述。

RuleId String 111

规则ID。

RuleTitle String AgentHeartBeatCheck

健康检查规格标题。

Service String YARN

服务名称。

code String 200

错误信息编码。

HealthLevel String NORMAL

健康级别,取值如下:

  • ABNORMAL:异常
  • NORMAL:正常
  • RESIZING:配置中
  • INITIALIZING:初始化中
  • RELEASED:已释放
ManualStoppedNum Integer 0

手动停止的组件个数。

NormalNum Integer 7

正常状态的组件个数。

ServiceName String YARN

服务名称。

StoppedNum Integer 0

已停止的组件个数。

TotalNum Integer 7

组件总数。

RequestId String DF202AC2-5D5D-4288-B608-B7B1595B5C7C

请求ID。

示例

请求示例

http(s)://[Endpoint]/?Action=ListClusterServiceComponentHealthInfo
&ClusterId=C-F32FB31D8295****
&RegionId=cn-hangzhou
&<公共请求参数>

正常返回示例

XML格式

<RequestId>F695F08B-6C37-482A-AA4F-44A07B05CE84</RequestId>
<ClusterId>C-F7CBF0B43D98****</ClusterId>
<HealthInfoList>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>7</NormalNum>
        <TotalNum>7</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>EMR-MONITOR</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>8</NormalNum>
        <TotalNum>8</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>GANGLIA</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>4</NormalNum>
        <TotalNum>4</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>EMRDOCTOR</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>1</NormalNum>
        <TotalNum>1</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>MYSQL</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>3</NormalNum>
        <TotalNum>3</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>SQOOP</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>1</NormalNum>
        <TotalNum>1</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>APACHEDS</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>3</NormalNum>
        <TotalNum>3</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>ILOGTAIL</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>2</StoppedNum>
        <NormalNum>7</NormalNum>
        <TotalNum>9</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>HDFS</ServiceName>
        <ManualStoppedNum>2</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>4</NormalNum>
        <TotalNum>4</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>TEZ</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>5</NormalNum>
        <TotalNum>5</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>SPARK</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>1</NormalNum>
        <TotalNum>1</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>HAPROXY</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>6</NormalNum>
        <TotalNum>6</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>PRESTO</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>9</NormalNum>
        <TotalNum>9</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>YARN</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>5</NormalNum>
        <TotalNum>5</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>EMRFLOW</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>1</NormalNum>
        <TotalNum>1</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>KNOX</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>3</NormalNum>
        <TotalNum>3</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>PIG</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>5</NormalNum>
        <TotalNum>5</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>HIVE</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
    <HealthInfo>
        <StoppedNum>0</StoppedNum>
        <NormalNum>1</NormalNum>
        <TotalNum>1</TotalNum>
        <HealthDetailList>
        </HealthDetailList>
        <ServiceName>HUE</ServiceName>
        <ManualStoppedNum>0</ManualStoppedNum>
        <HealthLevel>NORMAL</HealthLevel>
        <AgentHeartBeatLostNum>0</AgentHeartBeatLostNum>
    </HealthInfo>
</HealthInfoList>

JSON格式

{
    "RequestId": "F695F08B-6C37-482A-AA4F-44A07B05CE84",
    "ClusterId": "C-F7CBF0B43D98****",
    "HealthInfoList": {
        "HealthInfo": [
            {
                "StoppedNum": 0,
                "NormalNum": 7,
                "TotalNum": 7,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "EMR-MONITOR",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 8,
                "TotalNum": 8,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "GANGLIA",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 4,
                "TotalNum": 4,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "EMRDOCTOR",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 1,
                "TotalNum": 1,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "MYSQL",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 3,
                "TotalNum": 3,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "SQOOP",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 1,
                "TotalNum": 1,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "APACHEDS",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 3,
                "TotalNum": 3,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "ILOGTAIL",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 2,
                "NormalNum": 7,
                "TotalNum": 9,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "HDFS",
                "ManualStoppedNum": 2,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 4,
                "TotalNum": 4,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "TEZ",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 5,
                "TotalNum": 5,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "SPARK",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 1,
                "TotalNum": 1,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "HAPROXY",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 6,
                "TotalNum": 6,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "PRESTO",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 9,
                "TotalNum": 9,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "YARN",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 5,
                "TotalNum": 5,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "EMRFLOW",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 1,
                "TotalNum": 1,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "KNOX",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 3,
                "TotalNum": 3,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "PIG",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 5,
                "TotalNum": 5,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "HIVE",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            },
            {
                "StoppedNum": 0,
                "NormalNum": 1,
                "TotalNum": 1,
                "HealthDetailList": {
                    "HealthDetail": []
                },
                "ServiceName": "HUE",
                "ManualStoppedNum": 0,
                "HealthLevel": "NORMAL",
                "AgentHeartBeatLostNum": 0
            }
        ]
    }
}