Queries historical alerts.
This API has been deprecated. We recommend migrating to Cms(2019-01-01) - DescribeAlertLogList for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.
Operation description
This API operation is no longer maintained. We recommend that you call the DescribeAlertLogList operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:DescribeAlertHistoryList |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RuleId |
string |
No |
The ID of the alert rule. For information about how to obtain the ID of an alert rule, see DescribeMetricRuleList. |
applyTemplate61dc81b5-d357-4cf6-a9b7-9f83c1d5**** |
| RuleName |
string |
No |
The name of the alert rule. For information about how to query the name of an alert rule, see DescribeMetricRuleList. |
ECS_Rule |
| Namespace |
string |
No |
The namespace of the cloud service. For information about how to query the namespace of a cloud service, see Appendix 1: Metrics. |
acs_ecs_dashboard |
| MetricName |
string |
No |
The metric that is used to monitor the cloud service. For information about how to query the name of a metric, see Appendix 1: Metrics. |
cpu_total |
| GroupId |
string |
No |
The ID of the application group. For information about how to obtain the ID of an application group, see DescribeMonitorGroups. |
7671**** |
| Status |
string |
No |
Specifies whether alerts are muted. Valid values:
|
2 |
| State |
string |
No |
The status of the alert. Valid values:
|
ALARM |
| Ascending |
boolean |
No |
The order of alerts. Valid values:
|
true |
| StartTime |
string |
No |
The start timestamp of the historical alerts that you want to query. Unit: milliseconds. |
1640237400000 |
| EndTime |
string |
No |
The end timestamp of the historical alerts that you want to query. Unit: milliseconds. |
1640608200000 |
| PageSize |
integer |
No |
The number of entries to return on each page. Default value: 10. |
10 |
| Page |
integer |
No |
The number of the page to return. Default value: 1. |
1 |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code. Note
The status code 200 indicates that the request was successful. |
200 |
| Message |
string |
The error message. |
The Request is not authorization. |
| RequestId |
string |
The request ID. |
C3C69FBE-2262-541F-A409-C52F380BAE63 |
| Total |
string |
The total number of entries returned. |
2 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| AlarmHistoryList |
object |
||
| AlarmHistory |
array<object> |
The details of historical alerts. |
|
|
array<object> |
|||
| Status |
integer |
Indicates whether alerts are muted. Valid values:
|
2 |
| MetricName |
string |
The metric name. |
cpu_total |
| EvaluationCount |
integer |
The consecutive number of times for which the metric value meets the alert condition before an alert is triggered. |
3 |
| State |
string |
The alert status. Valid values:
|
ALARM |
| Namespace |
string |
The namespace of the cloud service. |
acs_ecs_dashboard |
| Webhooks |
string |
The callback URL. |
https://www.aliyun.com |
| RuleName |
string |
The name of the alert rule. |
ECS_Rule |
| RuleId |
string |
The ID of the alert rule. |
applyTemplate61dc81b5-d357-4cf6-a9b7-9f83c1d5**** |
| LastTime |
integer |
The duration of the alert. Unit: milliseconds. |
360133 |
| Value |
string |
The threshold of the metric value to trigger or clear an alert. |
10.58 |
| Expression |
string |
The expression that is used to trigger alerts. |
$Average>=10 |
| GroupId |
string |
The ID of the application group. |
7671**** |
| AlertTime |
integer |
The timestamp when the alert was triggered. Unit: milliseconds. |
1640586600000 |
| InstanceName |
string |
The instance name. |
i-bp1cqhiw1za2**** |
| Dimensions |
string |
The resources that are monitored. |
{\"instanceId\":\"i-bp1cqhiw1za2****\"} |
| Level |
string |
The severity level and notification methods of the alert. Valid values:
|
P4 |
| Contacts |
object |
||
| Contact |
array |
The alert contacts that receive alert notifications. |
|
|
string |
The alert contact that receives alert notifications. |
Alice |
|
| ContactALIIMs |
object |
||
| ContactALIIM |
array |
The TradeManager IDs of the alert contacts. Note
This parameter is valid only on the China site (aliyun.com). |
|
|
string |
The TradeManager ID of the alert contact. Note
This parameter is valid only on the China site (aliyun.com). |
username@example.com |
|
| ContactMails |
object |
||
| ContactMail |
array |
The email addresses of the alert contacts. |
|
|
string |
The email address of the alert contact. |
username@example.com |
|
| ContactSmses |
object |
||
| ContactSms |
array |
The mobile numbers of the alert contacts. Note
This parameter is valid only on the China site (aliyun.com). |
|
|
string |
The mobile number of the alert contact. Note
This parameter is valid only on the China site (aliyun.com). |
13900009999 |
|
| ContactGroups |
object |
||
| ContactGroup |
array |
The alert contact groups. |
|
|
string |
The alert contact group. |
ECS_Group |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "The Request is not authorization.",
"RequestId": "C3C69FBE-2262-541F-A409-C52F380BAE63",
"Total": "2",
"Success": true,
"AlarmHistoryList": {
"AlarmHistory": [
{
"Status": 2,
"MetricName": "cpu_total",
"EvaluationCount": 3,
"State": "ALARM",
"Namespace": "acs_ecs_dashboard",
"Webhooks": "https://www.aliyun.com",
"RuleName": "ECS_Rule",
"RuleId": "applyTemplate61dc81b5-d357-4cf6-a9b7-9f83c1d5****",
"LastTime": 360133,
"Value": "10.58",
"Expression": "$Average>=10",
"GroupId": "7671****",
"AlertTime": 1640586600000,
"InstanceName": "i-bp1cqhiw1za2****",
"Dimensions": "{\\\"instanceId\\\":\\\"i-bp1cqhiw1za2****\\\"}",
"Level": "P4",
"Contacts": {
"Contact": [
"Alice"
]
},
"ContactALIIMs": {
"ContactALIIM": [
"username@example.com"
]
},
"ContactMails": {
"ContactMail": [
"username@example.com"
]
},
"ContactSmses": {
"ContactSms": [
"13900009999"
]
},
"ContactGroups": {
"ContactGroup": [
"ECS_Group"
]
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | %s | %s | |
| 500 | %s | %s | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 204 | %s | %s | |
| 403 | %s | %s | |
| 206 | %s | %s | |
| 404 | %s | %s | |
| 503 | %s | %s | |
| 406 | %s | %s | |
| 409 | %s | %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.