All Products
Search
Document Center

Application Real-Time Monitoring Service:ListAlertEvents

Last Updated:Nov 05, 2024

Queries historical alert events.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:ListAlertEventsnone
  • 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
ShowNotificationPoliciesbooleanNo

Specifies whether to show the associated notification policy.

false

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

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

The returned struct.

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
Eventsarray<object>

The queried historical alert events.

eventsobject

The alert events.

AlertNamestring

The name of the alert.

Test-triggered alert
Severitystring

The severity level of the alert. Valid values:

  • 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.

2021-12-20 17:42:16
EndTimestring

The end time.

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 annotations.

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

The tags.

[{\"name\":\"severity\",\"value\":\"error\"}]
Alarmsarray<object>

The associated alerts.

alarmsobject

The information about the alert.

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
NotificationPoliciesarray<object>

The associated notification policies.

NotificationPolicyobject

The notification policies.

Idlong

The ID of the notification policy.

646093
Namestring

The name of the notification policy.

P1 alert notification policy
TriggerCountlong

The number of times the event is triggered.

10

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",
        "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 timeSummary of changesOperation
2024-05-11The response structure of the API has changedView Change Details
2024-05-11The request parameters of the API has changed. The response structure of the API has changedView Change Details