All Products
Search
Document Center

Application Real-Time Monitoring Service:ListAlerts

Last Updated:May 09, 2024

Queries the alert sending history.

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:GetAlarmHistoriesWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
AlertNamestringNo

The name of the alert rule.

Test alert
StatelongNo

The status of the alert. Valid values:

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

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
DispatchRuleIdlongNo

The ID of the notification policy.

12345
IntegrationTypestringNo

The integration type.

  • ARMS
  • CLOUD_MONITOR
  • MSE
  • ARMS_CLOUD_DIALTEST
  • PROMETHEUS
  • LOG_SERVICE
  • CUSTOM
  • ARMS_PROMETHEUS
  • ARMS_APP_MON
  • ARMS_FRONT_MON
  • ARMS_CUSTOM
  • XTRACE
  • GRAFANA
  • ZABBIX
  • SKYWALKING
  • EVENT_BRIDGE
  • NAGIOS
  • OPENFALCON
  • ARMS_INSIGHTS
ARMS_APP_MON
StartTimestringNo

The start time of the alert sending history that you want to query. Specify the time in the YYYY-MM-DD HH:mm:ss format.

2021-12-10 00:00:00
EndTimestringNo

The end time of the alert sending history that you want to query. Specify the time in the YYYY-MM-DD HH:mm:ss format.

2021-12-22 23:59:59
ShowEventsbooleanNo

Specifies whether to query the events that correspond to alerts. Valid values:

  • false (default value): The events are not queried.
  • true: The events are queried.
true
ShowActivitiesbooleanNo

Specifies whether to query the activities that correspond to alerts. Valid values:

  • false (default value): The activities are not queried.
  • true: The activities in the last three days are queried.
true
PagelongYes

The number of the page to return.

1
SizelongYes

The number of alerts to return on each page.

20
RegionIdstringNo

The ID of the region.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

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

The information about the array object.

Totallong

The total number of queried alerts.

1
Pagelong

The page number of the returned page.

1
Sizelong

The number of alerts returned per page.

20
ListAlertsobject []

The alerts for which the alert sending history is queried.

AlertNamestring

The name of the alert rule.

Test alert
Severitystring

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
Statelong

The status of the alert. Valid values:

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

The ID of the notification policy.

12345
DispatchRuleNamestring

The name of the notification policy.

DingTalk Notification
CreateTimestring

The time when the alert was created.

2022-01-18 00:21:35
Activitiesobject []

The list of activities.

Timestring

The operation time of the activity.

2021-12-20 19:08:57
Typelong

The type of the activity. Valid values:

  • 1: The alert is claimed.
  • 2: The alert is disclaimed.
  • 3: A comment is added for the alert.
  • 4: The alert is disabled.
  • 5: An alert notification is sent.
1
HandlerNamestring

The name of the handler.

O\&M Engineer A
Descriptionstring

The description of the activity.

\[Alert Claimed] The alert is claimed
Contentstring

The content of the alert notification.

\[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%.
AlertEventsobject []

The list of events.

AlertNamestring

The name of the event.

Test-triggered alert
Severitystring

The severity level of the event. Valid values:

  • critical
  • error
  • warning
  • info
warning
Statestring

The status of the event. Valid values:

  • Active: The event is not cleared.
  • Silenced: The event is silenced.
  • Resolved: The event is cleared.
Active
StartTimestring

The time when the event started.

2022-01-18 00:14:00
EndTimestring

The time when the event ended.

2022-01-19 17:10:31
ReceiveTimestring

The time when the event was created.

2022-01-19 17:05:42
IntegrationNamestring

The name of the integration that corresponds to the alert event.

ARMS
IntegrationTypestring

The type of the integration that corresponds to the alert event. Valid values:

  • ARMS
  • CLOUD_MONITOR
  • MSE
  • ARMS_CLOUD_DIALTEST
  • PROMETHEUS
  • LOG_SERVICE
  • CUSTOM
  • ARMS_PROMETHEUS
  • ARMS_APP_MON
  • ARMS_FRONT_MON
  • ARMS_CUSTOM
  • XTRACE
  • GRAFANA
  • ZABBIX
  • SKYWALKING
  • EVENT_BRIDGE
  • NAGIOS
  • OPENFALCON
  • ARMS_INSIGHTS
ARMS_APP_MON
GeneratorURLstring

The URL of the event.

http://arms.console.aliyun.com
Descriptionstring

The description of the event.

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%.
Annotationsstring

The annotations.

{ "_aliyun_arms_alert_value":"4.0" "_aliyun_arms_alert_traceId":"ac10c43116421327442277073d5461-105075299"}
Labelsstring

The tags.

{ "severity":"warning" "_aliyun_arms_alert_level":"ERROR" "_aliyun_arms_entropy":"0.30170457417889235"}
AlertIdlong

The alert ID.

2279
Solutionstring

The Alert solution.

--

Examples

Sample success responses

JSONformat

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

Error codes

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

Change history

Change timeSummary of changesOperation
2023-12-11The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-12-08The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-12-08The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-08-17The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: RegionId
Output ParametersThe response structure of the API has changed.
2023-05-25The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-05-11The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2022-01-14Add Operationsee changesets