All Products
Search
Document Center

Application Real-Time Monitoring Service:ListAlertEvents

Last Updated:May 09, 2024

Queries historical alert events.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
arms:ListAlertEventsWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
AlertNamestringNo

The name of the alert.

Test-triggered alert
StartTimestringNo

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
EndTimestringNo

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
PagelongYes

The number of the page to return.

1
SizelongYes

The number of entries to return on each page.

20
MatchingConditionsstringNo

The list of matching conditions.

[ { "value": "ARMS_NOTIFICATION", "key": "clustername", "operator": "eq" } ] },{ "matchingConditions": [ { "value": "test", "key": "alertname", "operator": "eq" } ]
StatusstringNo

The status of the alert events. Valid values:

  • Active
  • Silenced
  • Resolved
Active

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

2FC13182-B9AF-4E6B-BE51-72669B7C****
PageBeanobject

The struct returned.

Totallong

The total number of returned entries.

24
Pagelong

The number of the page returned.

1
Sizelong

The number of entries returned per page.

20
Eventsobject []

The list of information about historical alert events.

AlertNamestring

The name of the alert.

Test-triggered alert
Severitystring

The severity level of the alert. Valid value:

  • critical: P1
  • error: P2
  • warning: P3
  • page: P4
  • default: P6
critical
Statusstring

The status of the alert event. Valid values:

  • Active
  • Silenced
  • Resolved
Active
StartTimestring

The start time of the alert event.

2021-12-20 17:42:16
EndTimestring

The end time of the alert event.

2021-12-20 17:42:16
ReceiveTimestring

The time when the alert event was received.

2021-12-20 17:42:16
IntegrationNamestring

The name of the alert integration.

Custom integration
IntegrationTypestring

The type of the alert integration.

CUSTOM
GeneratorURLstring

The URL of the alert event.

https://xxx.xx/
Descriptionstring

The description of the alert event.

Test
Annotationsstring

The list of annotations.

[{\"Name\":\"annotation-a\",\"Value\":\"annotation a value\"}]
Labelsstring

The list of tags.

[{\"name\":\"severity\",\"value\":\"error\"}]
Alarmsobject []

The list of associated alerts.

AlarmIdlong

The ID of the alert.

77444
AlarmNamestring

The name of the alert.

Test-triggered alert
Stateinteger

The status of the alert. Valid values:

  • 0: The alert is pending.
  • 1: The alert is being handled.
  • 2: The alert is cleared.
0
CreateTimestring

The time when the alert was created.

2021-12-20 07:10:18
HandlerNamestring

The user who handled the alert.

Tom

Examples

Sample success responses

JSONformat

{
  "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"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history