ListAlertMessages
Queries a list of alert messages.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageNumber |
integer |
Yes |
The page number. Default value: 1. Minimum value: 1. Maximum value: 30. |
1 |
| PageSize |
integer |
Yes |
The number of entries per page. Default value: 10. Maximum value: 100. |
10 |
| BeginTime |
string |
Yes |
The start time of the alert. Specify the time in the yyyy-MM-dd'T'HH:mm:ssZ format. The time must be in UTC. |
2020-04-02T00:00:00+0800 |
| EndTime |
string |
Yes |
The end time of the alert. Specify the time in the yyyy-MM-dd'T'HH:mm:ssZ format. The time must be in UTC. |
2020-04-04T00:00:00+0800 |
| RemindId |
integer |
No |
The ID of the custom rule. This parameter takes effect when the |
9527 |
| AlertMethods |
string |
No |
The alert notification method. Valid values:
Separate multiple notification methods with commas (,). |
SMS,MAIL,PHONE |
| AlertUser |
string |
No |
The Alibaba Cloud UID of the alert recipient. |
12345 |
| AlertRuleTypes |
string |
No |
The rule type. Valid values:
|
GLOBAL,USER_DEFINE,OTHER |
| BaselineId |
integer |
No |
The baseline ID. This parameter takes effect when the |
1234 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| RequestId |
string |
The unique ID of the request. You can use the ID to troubleshoot issues. |
0000-ABCD-EFG**** |
| ErrorMessage |
string |
The error message. |
The specified parameters are invalid. |
| ErrorCode |
string |
The error code. |
Invalid.Tenant.ConnectionNotExists |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| Data |
object |
The list of returned alert messages. |
|
| PageNumber |
string |
The current page number. |
1 |
| PageSize |
string |
The number of entries per page. |
10 |
| TotalCount |
string |
The total number of alert messages. |
100 |
| AlertMessages |
array<object> |
The list of alert messages. |
|
|
array<object> |
The alert message. |
||
| RemindId |
integer |
The ID of the triggered custom monitoring rule. This parameter is returned when the Source parameter is set to REMIND_ALERT. |
1234 |
| AlertMessageStatus |
string |
The sending status. Valid values:
|
READY_TO_SEND |
| AlertUser |
string |
The Alibaba Cloud UID of the recipient. |
9527952795**** |
| AlertTime |
integer |
The timestamp of the alert. |
1553531401000 |
| AlertMethod |
string |
The alert notification method. Valid values:
|
SMS |
| Source |
string |
The alerting source. Valid values:
|
REMIND_ALERT |
| Content |
string |
The content of the alert. |
Node error |
| RemindName |
string |
The name of the triggered custom monitoring rule. This parameter is returned when the Source parameter is set to REMIND_ALERT. |
Custom monitoring rule name |
| AlertId |
integer |
The alert ID. |
1234 |
| Instances |
array<object> |
The list of instances that triggered the custom monitoring rule. This parameter is returned when the Source parameter is set to REMIND_ALERT. For other alert sources, this parameter is empty. |
|
|
object |
The instance information. |
||
| Status |
string |
The instance status. Valid values:
|
NOT_RUN |
| InstanceId |
integer |
The instance ID. |
12345 |
| NodeName |
string |
The node name. |
Node name |
| NodeId |
integer |
The node ID. |
1234 |
| ProjectId |
integer |
The ID of the workspace to which the node belongs. |
1234 |
| Topics |
array<object> |
The list of events that triggered the alerting. This parameter is returned when the Source parameter is set to TOPIC_ALERT (global event alerting). For other alerting sources, this parameter is empty. |
|
|
object |
The event information. |
||
| TopicName |
string |
The event name. |
9527 error |
| InstanceId |
integer |
The instance ID associated with the event. |
12345 |
| TopicId |
integer |
The event ID. |
1234 |
| TopicOwner |
string |
The Alibaba Cloud UID of the event owner. |
9527952795**** |
| NodeId |
integer |
The ID of the node associated with the event. |
1234 |
| TopicStatus |
string |
The event status. Valid values:
|
FIXING |
| Nodes |
array<object> |
Different alert sources return different node lists:
|
|
|
object |
The node information. |
||
| Owner |
string |
The Alibaba Cloud UID of the node owner. |
95279527952**** |
| NodeName |
string |
The node name. |
Node name |
| NodeId |
integer |
The node ID. |
1234 |
| ProjectId |
integer |
The ID of the workspace to which the node belongs. |
1234 |
| SlaAlert |
object |
The basic instance information that triggered the baseline alert. This parameter is returned when the Source parameter is set to SLA_ALERT. For other alert sources, this parameter is empty. |
|
| Status |
string |
The baseline status. Valid values:
|
SAFE |
| BaselineOwner |
string |
The Alibaba Cloud UIDs of the baseline owners. Multiple UIDs are separated by commas (,). |
952795279**** |
| BaselineId |
integer |
The baseline ID. |
1234 |
| BaselineName |
string |
The baseline name. |
Baseline name |
| Bizdate |
integer |
The timestamp of the business date of the baseline instance. |
1553443200000 |
| ProjectId |
integer |
The ID of the workspace to which the baseline belongs. |
1234 |
| InGroupId |
integer |
The cycle number of the baseline instance. The value is 1 for daily baselines and ranges from 1 to 24 for hourly baselines. |
1 |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "0000-ABCD-EFG****",
"ErrorMessage": "The specified parameters are invalid.",
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Success": true,
"Data": {
"PageNumber": "1",
"PageSize": "10",
"TotalCount": "100",
"AlertMessages": [
{
"RemindId": 1234,
"AlertMessageStatus": "READY_TO_SEND",
"AlertUser": "9527952795****",
"AlertTime": 1553531401000,
"AlertMethod": "SMS",
"Source": "REMIND_ALERT",
"Content": "Node error",
"RemindName": "Custom monitoring rule name",
"AlertId": 1234,
"Instances": [
{
"Status": "NOT_RUN",
"InstanceId": 12345,
"NodeName": "Node name",
"NodeId": 1234,
"ProjectId": 1234
}
],
"Topics": [
{
"TopicName": "9527 error",
"InstanceId": 12345,
"TopicId": 1234,
"TopicOwner": "9527952795****",
"NodeId": 1234,
"TopicStatus": "FIXING"
}
],
"Nodes": [
{
"Owner": "95279527952****",
"NodeName": "Node name",
"NodeId": 1234,
"ProjectId": 1234
}
],
"SlaAlert": {
"Status": "SAFE",
"BaselineOwner": "952795279****",
"BaselineId": 1234,
"BaselineName": "Baseline name",
"Bizdate": 1553443200000,
"ProjectId": 1234,
"InGroupId": 1
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | Forbidden.Not.Server | The dataworksAPI service is not available in this area. Please try it in another area. | |
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.Api.Risk | The request for this resource has exceeded your daily available limit. | |
| 429 | Throttling.Resource | You have reached the limit for the resource. Please contact us by submitting a ticket. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.