Queries historical alert events.
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:ListAlertEvents | none |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
AlertName | string | No | The name of the alert. | Test-triggered alert |
StartTime | string | No | The start time of the alert events that you want to query. Specify the time in the YYYY-MM-DD HH:mm:ss format. | 2021-12-19 00:00:00 |
EndTime | string | No | The end time of the alert events that you want to query. Specify the time in the YYYY-MM-DD HH:mm:ss format. | 2021-12-22 23:59:59 |
Page | long | Yes | The number of the page to return. | 1 |
Size | long | Yes | The number of entries to return on each page. | 20 |
MatchingConditions | string | No | The list of matching conditions. | [ { "value": "ARMS_NOTIFICATION", "key": "clustername", "operator": "eq" } ] },{ "matchingConditions": [ { "value": "test", "key": "alertname", "operator": "eq" } ] |
Status | string | No | The status of the alert events. Valid values:
| Active |
ShowNotificationPolicies | boolean | No | Specifies whether to show the associated notification policy. | false |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "2FC13182-B9AF-4E6B-BE51-72669B7C****",
"PageBean": {
"Total": 24,
"Page": 1,
"Size": 20,
"Events": [
{
"AlertName": "Test-triggered alert\n",
"Severity": "critical",
"Status": "Active",
"StartTime": "2021-12-20 17:42:16",
"EndTime": "2021-12-20 17:42:16",
"ReceiveTime": "2021-12-20 17:42:16",
"IntegrationName": "Custom integration\n",
"IntegrationType": "CUSTOM",
"GeneratorURL": "https://xxx.xx/",
"Description": "Test\n",
"Annotations": "[{\\\"Name\\\":\\\"annotation-a\\\",\\\"Value\\\":\\\"annotation a value\\\"}]",
"Labels": "[{\\\"name\\\":\\\"severity\\\",\\\"value\\\":\\\"error\\\"}]",
"Alarms": [
{
"AlarmId": 77444,
"AlarmName": "Test-triggered alert\n",
"State": 0,
"CreateTime": "2021-12-20 07:10:18"
}
],
"HandlerName": "Tom\n",
"NotificationPolicies": [
{
"Id": 646093,
"Name": "P1 alert notification policy\n"
}
],
"TriggerCount": 10
}
]
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-11 | The response structure of the API has changed | View Change Details |
2024-05-11 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |