Queries the alert sending history.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
arms:GetAlarmHistories | none |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
AlertName | string | No | The name of the alert rule. | Test alert |
State | long | No | The status of the alert. Valid values:
| 2 |
Severity | string | No | The severity level of the alert. Valid values: P6, P5, P4, P3, P2, and P1. The preceding values are listed in ascending order of severity. | P6 |
DispatchRuleId | long | No | The ID of the notification policy. | 12345 |
IntegrationType | string | No | The integration type.
| ARMS_APP_MON |
StartTime | string | No | The start time of the alert sending history that you want to query. Specify the time in the | 2021-12-10 00:00:00 |
EndTime | string | No | The end time of the alert sending history that you want to query. Specify the time in the | 2021-12-22 23:59:59 |
ShowEvents | boolean | No | Specifies whether to query the events that correspond to alerts. Valid values:
| true |
ShowActivities | boolean | No | Specifies whether to query the activities that correspond to alerts. Valid values:
| true |
Page | long | Yes | The number of the page to return. | 1 |
Size | long | Yes | The number of alerts to return on each page. | 20 |
RegionId | string | No | The ID of the region. | cn-hangzhou |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "2FC13182-B9AF-4E6B-BE51-72669B7C****",
"PageBean": {
"Total": 1,
"Page": 1,
"Size": 20,
"ListAlerts": [
{
"AlertName": "Test alert\n",
"Severity": "P6",
"State": 0,
"DispatchRuleId": 12345,
"DispatchRuleName": "DingTalk Notification\n",
"CreateTime": "2022-01-18 00:21:35",
"Activities": [
{
"Time": "2021-12-20 19:08:57",
"Type": 1,
"HandlerName": "O\\&M Engineer A\n",
"Description": "\\[Alert Claimed] The alert is claimed\n",
"Content": "\\[Notification policy: Send notifications to DingTalk groups] Host monitoring. Host IP address: 10.76.XX.XX. Average memory usage of the host in the last 1 minute ≥ 1.0%. Current value: 84.7454%.\n"
}
],
"AlertEvents": [
{
"AlertName": "Test-triggered alert\n",
"Severity": "warning",
"State": "Active",
"StartTime": "2022-01-18 00:14:00",
"EndTime": "2022-01-19 17:10:31",
"ReceiveTime": "2022-01-19 17:05:42",
"IntegrationName": "ARMS",
"IntegrationType": "ARMS_APP_MON",
"GeneratorURL": "http://arms.console.aliyun.com",
"Description": "Host monitoring. Host IP address: 10.76.XX.XX. Average memory usage of the host in the last 1 minute ≥ 1.0%. Current value: 84.7454%.\n",
"Annotations": "{ \"_aliyun_arms_alert_value\":\"4.0\" \"_aliyun_arms_alert_traceId\":\"ac10c43116421327442277073d5461-105075299\"}",
"Labels": "{ \"severity\":\"warning\" \"_aliyun_arms_alert_level\":\"ERROR\" \"_aliyun_arms_entropy\":\"0.30170457417889235\"}"
}
],
"AlertId": 2279,
"Solution": "--",
"Owner": "",
"Handler": "",
"AcknowledgeTime": 0,
"RecoverTime": 0,
"NotifyRobots": "",
"Describe": ""
}
]
},
"Message": ""
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-08-26 | The response structure of the API has changed | View Change Details |
2024-07-30 | The request parameters of the API has changed | View Change Details |
2023-12-11 | The response structure of the API has changed | View Change Details |
2023-12-08 | The response structure of the API has changed | View Change Details |
2023-12-08 | The response structure of the API has changed | View Change Details |
2023-08-17 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2023-05-25 | The response structure of the API has changed | View Change Details |
2023-05-11 | The response structure of the API has changed | View Change Details |
2022-01-14 | Add Operation | View Change Details |