获取告警状态详情,包含告警状态、时间、结果等内容

调试

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

请求参数

名称 类型 是否必选 示例值 描述
DeviceId String device-jrjb476ub06

设备ID

MonitorItemId String m-22ut5sn54o35wsz6

监控项ID

Type String SINGLE

数据类型

AggregateDataId String a-52gmqniln3u53n32

聚合数据ID

DedicatedLineId String d-52gmqniln3u53n32

专线ID

返回数据

名称 类型 示例值 描述
RequestId String AC8F05E6-AFBB-4AAE-B75E-A6539A9BAAA8

request Id

AlarmStatus object

告警状态

DeviceId String device-jrjb476ub06

设备ID

MonitorItemId String m-22ut5sn54o35wsz6

监控项ID

CollectionTime String 2021-01-01 00:01:00

采集时间

ReceiveTime String 2021-01-01 00:01:00

接收时间

AlarmRule String {"alarmStatus":"WARNING","expression":">=","variable":"avg-latency","monitorItemId":"m-52gmqniln3u53n32","type":"SINGLE","value":"0"}

命中告警规则

AlarmStatus String WARNING

告警状态

Result String {"loss_rate":"0","avg-latency":"4.51"}

采集结果

AbnormalDataItem String [{"avg_latency":4.51}]

异常数据项

UniqueKey String d-fwq29cmatva28_m-52gmqniln3u53n32

索引

ResponseCode String OK

采集状态码

ResourceDevice object

设备

HostName String CSW-HZ3.YT

设备名

Ip String 127.0.0.1

IP

Vendor String H3C

厂商

Model String H3C-7500

型号

Status String online

状态

Sn String 123456

sn

Space String 银泰武林店

物理空间

DeviceId String device-jrjb476ub06

设备ID

SecurityDomain String YT

安全域

DeviceForm String 网络设备

设备形态

MonitorItem object

监控项

MonitorItemName String Ping_Monitor

监控项名称

MonitorItemDescription String 连通性监控

描述

SecurityDomain String YT

安全域

CollectionType String PING

采集类型

ExecInterval String 60

执行间隔

MonitorItemId String m-22ut5sn54o35wsz6

监控项ID

DeviceForm String 网络设备

设备形态

Effective Long 1

是否启用

FirstAbnormalTime String 2021-01-01 00:01:00

首次异常时间

NotificationSwitch object

告警开关

Reason String Temporarily Closed

关闭原因

ExpiryTime String 2021-01-01 00:01:00

关闭到期时间

AggregateDataId String a-52gmqniln3u53n32

聚合数据ID

DedicatedLineId String d-52gmqniln3u53n32

专线ID

AggregateData object

聚合数据详情

AggregateMode String SUM

聚合方式

AggregateDataDescription String avg latency avg

描述

DataItem String latency

数据项

AggregateDataName String avg_latency_avg

聚合数据名称

DeviceId String device-jrjb476ub06

设备ID

IsAllDevice Integer 0

是否聚合全部设备

AggregateDataId String a-52gmqniln3u53n32

聚合数据ID

MonitorItemId String m-22ut5sn54o35wsz6

监控项ID

DedicatedLine object

专线详情

DedicatedLineName String 银泰武林店_电信
Space String 银泰武林店

物理空间

PortName String GigabitEthernet1/0/0

端口名

DeviceId String device-jrjb476ub06

设备ID

Bandwidth String 100

带宽

Ip String 127.0.0.1

IP

示例

请求示例

http(s)://[Endpoint]/?Type=SINGLE
&DedicatedLineId=d-52gmqniln3u53n32
&DeviceId=device-jrjb476ub06
&MonitorItemId=m-22ut5sn54o35wsz6
&AggregateDataId=a-52gmqniln3u53n32
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<RequestId>AC8F05E6-AFBB-4AAE-B75E-A6539A9BAAA8</RequestId>
<AlarmStatus>
    <ResponseCode>OK</ResponseCode>
    <CollectionTime>2021-01-01 00:01:00</CollectionTime>
    <AggregateData>
        <AggregateMode>SUM</AggregateMode>
        <AggregateDataDescription>avg latency avg</AggregateDataDescription>
        <DataItem>latency</DataItem>
        <AggregateDataName>avg_latency_avg</AggregateDataName>
        <DeviceId>device-jrjb476ub06</DeviceId>
        <IsAllDevice>0</IsAllDevice>
        <AggregateDataId>a-52gmqniln3u53n32</AggregateDataId>
        <MonitorItemId>m-22ut5sn54o35wsz6</MonitorItemId>
    </AggregateData>
    <DeviceId>device-jrjb476ub06</DeviceId>
    <AlarmRule>{"alarmStatus":"WARNING","expression":"&gt;=","variable":"avg-latency","monitorItemId":"m-52gmqniln3u53n32","type":"SINGLE","value":"0"}</AlarmRule>
    <MonitorItem>
        <DeviceForm>网络设备</DeviceForm>
        <MonitorItemName>Ping_Monitor</MonitorItemName>
        <ExecInterval>60</ExecInterval>
        <CollectionType>PING</CollectionType>
        <MonitorItemId>m-22ut5sn54o35wsz6</MonitorItemId>
        <MonitorItemDescription>连通性监控</MonitorItemDescription>
        <SecurityDomain>YT</SecurityDomain>
        <Effective>1</Effective>
    </MonitorItem>
    <MonitorItemId>m-22ut5sn54o35wsz6</MonitorItemId>
    <AggregateDataId>a-52gmqniln3u53n32</AggregateDataId>
    <AbnormalDataItem>[{"avg_latency":4.51}]</AbnormalDataItem>
    <FirstAbnormalTime>2021-01-01 00:01:00</FirstAbnormalTime>
    <NotificationSwitch>
        <ExpiryTime>2021-01-01 00:01:00</ExpiryTime>
        <Reason>Temporarily Closed</Reason>
    </NotificationSwitch>
    <Result>{"loss_rate":"0","avg-latency":"4.51"}</Result>
    <DedicatedLine>
        <Space>银泰武林店</Space>
        <DeviceId>device-jrjb476ub06</DeviceId>
        <Bandwidth>100</Bandwidth>
        <Ip>127.0.0.1</Ip>
        <PortName>GigabitEthernet1/0/0</PortName>
        <LineName>银泰武林店_电信</LineName>
    </DedicatedLine>
    <ResourceDevice>
        <Status>online</Status>
        <Space>银泰武林店</Space>
        <DeviceForm>网络设备</DeviceForm>
        <DeviceId>device-jrjb476ub06</DeviceId>
        <Ip>127.0.0.1</Ip>
        <Model>H3C-7500</Model>
        <Vendor>H3C</Vendor>
        <Sn>123456</Sn>
        <HostName>CSW-HZ3.YT</HostName>
        <SecurityDomain>YT</SecurityDomain>
    </ResourceDevice>
    <DedicatedLineId>d-52gmqniln3u53n32</DedicatedLineId>
    <UniqueKey>d-fwq29cmatva28_m-52gmqniln3u53n32</UniqueKey>
    <AlarmStatus>WARNING</AlarmStatus>
    <ReceiveTime>2021-01-01 00:01:00</ReceiveTime>
</AlarmStatus>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "AC8F05E6-AFBB-4AAE-B75E-A6539A9BAAA8",
  "AlarmStatus" : {
    "ResponseCode" : "OK",
    "CollectionTime" : "2021-01-01 00:01:00",
    "AggregateData" : {
      "AggregateMode" : "SUM",
      "AggregateDataDescription" : "avg latency avg",
      "DataItem" : "latency",
      "AggregateDataName" : "avg_latency_avg",
      "DeviceId" : "device-jrjb476ub06",
      "IsAllDevice" : "0",
      "AggregateDataId" : "a-52gmqniln3u53n32",
      "MonitorItemId" : "m-22ut5sn54o35wsz6"
    },
    "DeviceId" : "device-jrjb476ub06",
    "AlarmRule" : "{\"alarmStatus\":\"WARNING\",\"expression\":\">=\",\"variable\":\"avg-latency\",\"monitorItemId\":\"m-52gmqniln3u53n32\",\"type\":\"SINGLE\",\"value\":\"0\"}",
    "MonitorItem" : {
      "DeviceForm" : "网络设备",
      "MonitorItemName" : "Ping_Monitor",
      "ExecInterval" : "60",
      "CollectionType" : "PING",
      "MonitorItemId" : "m-22ut5sn54o35wsz6",
      "MonitorItemDescription" : "连通性监控",
      "SecurityDomain" : "YT",
      "Effective" : "1"
    },
    "MonitorItemId" : "m-22ut5sn54o35wsz6",
    "AggregateDataId" : "a-52gmqniln3u53n32",
    "AbnormalDataItem" : "[{\"avg_latency\":4.51}]",
    "FirstAbnormalTime" : "2021-01-01 00:01:00",
    "NotificationSwitch" : {
      "ExpiryTime" : "2021-01-01 00:01:00",
      "Reason" : "Temporarily Closed"
    },
    "Result" : "{\"loss_rate\":\"0\",\"avg-latency\":\"4.51\"}",
    "DedicatedLine" : {
      "Space" : "银泰武林店",
      "DeviceId" : "device-jrjb476ub06",
      "Bandwidth" : "100",
      "Ip" : "127.0.0.1",
      "PortName" : "GigabitEthernet1/0/0",
      "LineName" : "银泰武林店_电信"
    },
    "ResourceDevice" : {
      "Status" : "online",
      "Space" : "银泰武林店",
      "DeviceForm" : "网络设备",
      "DeviceId" : "device-jrjb476ub06",
      "Ip" : "127.0.0.1",
      "Model" : "H3C-7500",
      "Vendor" : "H3C",
      "Sn" : "123456",
      "HostName" : "CSW-HZ3.YT",
      "SecurityDomain" : "YT"
    },
    "DedicatedLineId" : "d-52gmqniln3u53n32",
    "UniqueKey" : "d-fwq29cmatva28_m-52gmqniln3u53n32",
    "AlarmStatus" : "WARNING",
    "ReceiveTime" : "2021-01-01 00:01:00"
  }
}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidParameter%s The specified parameter %s is invalid. 参数无效,请检查参数
400 Missing%s You must specify the parameter %s. 必填参数没有填。请检查调用时是否填写了此参数,并重试请求。
404 Invalid%s.NotFound The specified resource %s does not exist. 找不到对应资源

访问错误中心查看更多错误码。

访问错误中心查看更多错误码。