.icms-tree-table-trigger {
display: inline-block;
width: 17px;
height: 17px;
margin-right: 3px;
line-height: 14px;
text-align: center;
background: #fff;
border: 1px solid #e8e8e8;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.icms-tree-table-trigger::after {
content: ‘+’;
}
.icms-tree-table-trigger-expanded::after {
content: ‘-‘
}
调用DescribeAlertHistoryList接口查询报警历史详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeAlertHistoryList |
系统规定参数。取值:DescribeAlertHistoryList。 |
AlertStatus | String | 否 | ALARM |
报警状态。取值:
|
Ascending | Boolean | 否 | true |
时间排序。取值:
默认为时间倒序。 |
EndTime | String | 否 | 1554085998000 |
结束时间。 格式为Unix时间戳,即从1970年1月1日开始所经过的秒数。 |
GroupId | String | 否 | 123456 |
应用组ID。 |
MetricName | String | 否 | cpu_total |
监控项名称。 |
Namespace | String | 否 | acs_ecs_dashboard |
产品的数据命名空间。 |
Page | Integer | 否 | 1 |
页码。 |
PageSize | Integer | 否 | 10 |
每页显示记录条数。 |
RuleId | String | 否 | aaaabbb123 |
报警规则ID。 |
RuleName | String | 否 | 我的报警规则 |
报警规则名称。 |
StartTime | String | 否 | 1554085998000 |
开始时间。 格式为Unix时间戳,即从1970年1月1日开始所经过的秒数。 |
State | String | 否 | 2 |
通道沉默状态。取值:
|
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 189B35DD-68BA-43CE-A66A-57F0BE12C885 |
请求ID。 |
Code | String | 200 |
状态码。 |
Success | Boolean | true |
请求是否成功。 |
Total | String | 2 |
总记录条数。 |
AlarmHistoryList | Array |
报警历史详情。 |
|
AlarmHistory |
报警历史详情。 |
||
AlertName | String | 我的报警规则 |
报警规则名称。 |
AlertState | String | OK |
报警状态。取值:
|
AlertTime | Long | 1554105040000 |
发生报警的时间。 |
ContactALIIMs | List | 我的旺旺 |
旺旺报警通知。 |
ContactALIIM |
旺旺报警通知。 |
||
ContactGroups | List | 报警通知联系组 |
报警联系人组。 |
ContactGroup |
报警联系人组。 |
||
ContactMails | List | xxx@aliyun.com |
邮件报警通知人。 |
ContactMail |
邮件报警通知人。 |
||
ContactSmses | List | 1333333**** |
短信报警联系方式,手机号列表。 |
ContactSms |
短信报警联系方式,手机号列表。 |
||
Contacts | List | 我的报警联系人 |
报警联系人。 |
Contact |
报警联系人。 |
||
Dimensions | String | {“instanceId”:”i-2zebwilv3xfdg1****”} |
关联的资源。 |
EvaluationCount | Integer | 2 |
报警重试次数。 |
Expression | String | $Average>=1 |
报警触发表达式。 |
GroupId | String | 12345 |
应用组ID。 |
InstanceName | String | ali-186xxxx123456 |
实例名称。 |
LastTime | Long | 347020693 |
最后一次出现状态改变的时间。 |
Level | String | P3 |
报警级别。取值:
|
MetricName | String | cpu_total |
监控项名称。 |
Namespace | String | acs_ecs_dashboard |
产品的数据命名空间。 |
RuleId | String | d97a65a7-70d2-4a8a-97bf-1a9147**** |
报警规则的ID。 |
RuleName | String | 我的报警 |
报警规则名称。 |
Status | Integer | 2 |
通道沉默状态。取值:
|
Value | String | 5.39 |
出现报警或者恢复时候的监控值。 |
Webhooks | String | http://www.aliyun.com/webhook.html |
URL回调地址。 |
Message | String | success |
错误信息。 |
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeAlertHistoryList
&<公共请求参数>
正常返回示例
XML
格式
<AlarmHistoryList>
<AlarmHistory>
<Value>4.41</Value>
<LastTime>881140083</LastTime>
<Webhooks/>
<ContactSmses>
</ContactSmses>
<RuleName>test-auto-scaling-0001</RuleName>
<GroupId/>
<AlertName>putNewAlarm_xxxxxx</AlertName>
<EvaluationCount>1</EvaluationCount>
<Status>2</Status>
<AlertState>ALARM</AlertState>
<MetricName>cpu_total#60</MetricName>
<ContactMails>
</ContactMails>
<AlertTime>1554986620000</AlertTime>
<Dimensions>{"instanceId":"i-2******3"}</Dimensions>
<RuleId/>
<Contacts>
</Contacts>
<Namespace>acs_ecs</Namespace>
<ContactALIIMs>
</ContactALIIMs>
<ContactGroups>
</ContactGroups>
<Expression>$Average>=1</Expression>
<Level>P3</Level>
<InstanceName/>
</AlarmHistory>
<AlarmHistory>
<Value>2.13</Value>
<LastTime>760058</LastTime>
<Webhooks/>
<ContactSmses>
</ContactSmses>
<RuleName>test-auto-scaling-0001</RuleName>
<GroupId/>
<AlertName>putNewAlarm_us****</AlertName>
<EvaluationCount>1</EvaluationCount>
<Status>2</Status>
<AlertState>ALARM</AlertState>
<MetricName>cpu_total#60</MetricName>
<ContactMails>
</ContactMails>
<AlertTime>1554986620000</AlertTime>
<Dimensions>{"instanceId":"i-2z*****"}</Dimensions>
<RuleId/>
<Contacts>
</Contacts>
<Namespace>acs_ecs</Namespace>
<ContactALIIMs>
</ContactALIIMs>
<ContactGroups>
</ContactGroups>
<Expression>$Average>=1</Expression>
<Level>P3</Level>
<InstanceName/>
</AlarmHistory>
</AlarmHistoryList>
<RequestId>FEBE3561-166F-4DB2-BB59-020B26F30318</RequestId>
<Success>true</Success>
<Code>200</Code>
<Total>102390</Total>
JSON
格式
{
"AlarmHistoryList":{
"AlarmHistory":[
{
"Value":"4.41",
"LastTime":881140083,
"Webhooks":"",
"ContactSmses":{
"ContactSms":[]
},
"RuleName":"test-auto-scaling-0001",
"GroupId":"",
"AlertName":"putNewAlarm_xxxxxx",
"EvaluationCount":1,
"Status":2,
"AlertState":"ALARM",
"MetricName":"cpu_total#60",
"AlertTime":1554986620000,
"ContactMails":{
"ContactMail":[]
},
"Dimensions":"{\"instanceId\":\"i-2******3\"}",
"RuleId":"",
"Namespace":"acs_ecs",
"Contacts":{
"Contact":[]
},
"Level":"P3",
"Expression":"$Average>=1",
"ContactGroups":{
"ContactGroup":[]
},
"ContactALIIMs":{
"ContactALIIM":[]
},
"InstanceName":""
},
{
"Value":"2.13",
"LastTime":760058,
"Webhooks":"",
"ContactSmses":{
"ContactSms":[]
},
"RuleName":"test-auto-scaling-0001",
"GroupId":"",
"AlertName":"putNewAlarm_us****",
"EvaluationCount":1,
"Status":2,
"AlertState":"ALARM",
"MetricName":"cpu_total#60",
"AlertTime":1554986620000,
"ContactMails":{
"ContactMail":[]
},
"Dimensions":"{\"instanceId\":\"i-2z*****\"}",
"RuleId":"",
"Namespace":"acs_ecs",
"Contacts":{
"Contact":[]
},
"Level":"P3",
"Expression":"$Average>=1",
"ContactGroups":{
"ContactGroup":[]
},
"ContactALIIMs":{
"ContactALIIM":[]
},
"InstanceName":""
}
]
},
"RequestId":"FEBE3561-166F-4DB2-BB59-020B26F30318",
"Success":true,
"Code":"200",
"Total":102390
}
错误码
访问错误中心查看更多错误码。
原创文章,作者:网友投稿,如若转载,请注明出处:https://www.cloudads.cn/archives/33665.html