Queries alerts.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListAlertMessages

The operation that you want to perform.

BeginTime String Yes 2020-04-02T00:00:00+0800

The start time of an alert. The time must be in yyyy-MM-dd'T'HH:mm:ssZ format and displayed in UTC.

EndTime String Yes 2020-04-04T00:00:00+0800

The end time of the alert. The time follows the yyyy-MM-dd'T'HH:mm:ssZ format in UTC.

PageNumber Integer Yes 1

The number of pages that are returned. The default value is 1, the minimum value is 1, and the maximum value is 30.

PageSize Integer Yes 10

The number of entries per page. Default value: 10. Maximum value: 100.

RegionId String Yes cn-shanghai

The unique identifier of the zone.

RemindId Long Yes 9527

The ID of the custom rule. This parameter takes effect only when the value of AlertRuleTypes includes custom rules with USER_DEFINE.

AlertMethods String No SMS,MAIL,PHONE

The alert method. Valid values: MAIL, SMS, and PHONE. PHONE number: DataWorks Professional Edition and later. Separate multiple notification methods with commas (,).

AlertUser String No Alarm contacts

The Alibaba Cloud UID of the alert recipient.

AlertRuleTypes String No GLOBAL,USER_DEFINE,OHTER

The rule type. Valid values: GLOBAL, USER_DEFINE, and OTHER. Separate multiple rule types with commas (,).

Response parameters

Parameter Type Example Description
Data Struct

The returned alert information.

AlertMessages Array of AlertMessages

The list of alert information.

AlertId Long 1234

The alert ID.

AlertMessageStatus String READY_TO_SEND

The sending status. Valid values: READY_TO_SEND, SEND_FAIL, SEND_SUCCESS, and SEND_OVERLIMIT.

AlertMethod String SMS

The alert method. Valid values: MAIL, SMS, and PHONE. PHONE number: DataWorks Professional Edition and later.

AlertTime Long 1553531401000

The timestamp of the alert.

AlertUser String 9527952795****

The Alibaba Cloud UID of the recipient.

Content String Node error

The content of the alert.

Instances Array of Instances

When the value of Source is memord_alert, a list of instances that trigger custom monitoring rules is returned. The error message returned when other alert sources are empty.

InstanceId Long 12345

The ID of the instance that you want to modify.

NodeId Long 1234

The ID of the node.

NodeName String The name of the node

The name of the node.

ProjectId Long 1234

The ID of the workspace to which the node belongs.

Status String NOT_RUN

The instance status, including NOT_RUN, WAIT_TIME, WAIT_RESOURCE, RUNNING, CHECKING, CHECKING_CONDITION, FAILURE, and SUCCESS.

Nodes Array of Nodes

Different alarm sources return different node list:

  • When Source is set to NODE_ CYCLE_ALERT, that is, the node in the ring is returned.
  • When Source is set to NODE_LONELY_ALERT, the node is isolated.
NodeId Long 1234

The ID of the node.

NodeName String The name of the node

The name of the node.

Owner String 95279527952****

The UID of the node owner.

ProjectId Long 1234

The ID of the workspace to which the node belongs.

RemindId Long 1234

The ID of the custom monitoring rule that is triggered. This parameter is required when the alarm Source parameter is set to specified.

RemindName String Custom monitoring rule name

The name of the custom monitoring rule that is triggered when the value of the Source parameter is memord_alert.

SlaAlert Struct

If the value of the Source parameter is attached to a baseline alert, the server returns information about the instance that triggers the baseline alert. If the alarm source is of another data type, null is returned.

BaselineId Long 1234

The ID of the baseline.

BaselineName String Baseline check

The name of the baseline.

BaselineOwner String 952795279****

The Alibaba Cloud UID of the owner of the baseline. Separate multiple UIDs with commas (,).

Bizdate Long 12345

The timestamp of the business date on the baseline instance.

InGroupId Integer 1

The cycle ID of the baseline instance: Apsara infrastructure management framework line is 1, the hour baseline range is [1,24].

ProjectId Long 1234

The ID of the workspace to which the baseline belongs.

Status String SAFE

The status of the baseline. Valid values: ERROR, SAFE, dangrouus, and OVER.

Source String REMIND_ALERT

The alert source, including memord_alert (custom alert), TOPIC_ALERT (event alert), SLA_ALERT (baseline alert), NODE_CYCLE_ALERT (node ring alert), and NODE_LONELY_ALERT (node isolation alert).

Topics Array of Topics

When the value of Source (alarm Source) is TOPIC_ALERT (Global Event Alert), the event list that triggers the alarm is returned. If the alert source uses another data type, the returned result is empty.

InstanceId Long 12345

The instance ID associated with the event.

NodeId Long 1234

The ID of the node associated with the event.

TopicId Long 1234

The ID of the event.

TopicName String 9527 error

The name of the event.

TopicOwner String 9527952795****

The Alibaba Cloud UID of the event owner.

TopicStatus String FIXING

The status of the event. Valid values: IGNORE, NEW, FIXING, and RECOVER.

PageNumber String 1

The current page number.

PageSize String 10

The size of each page.

TotalCount String 100

The total number of alerts.

ErrorCode String 1031203110005

The error code.

ErrorMessage String The specified parameters are invalid.

The error message.

HttpStatusCode Integer 200

The HTTP status code.

RequestId String 0000-ABCD-EFG****

The unique ID of the call. You can use the error ID to troubleshoot the error.

Success Boolean true

Indicates whether the request was successful.

Examples

Sample requests


     http(s)://[Endpoint]/? Action=ListAlertMessages &BeginTime=2020-04-02T00:00:00+0800 &EndTime=2020-04-04T00:00:00+0800 &PageNumber=1 &PageSize=10 &RegionId=cn-shanghai&summardid=9527 &<common request parameters> 
   

Sample success responses

XML format


     <RequestId> 0000-abcd-efg****** </RequestId> <HttpStatusCode> 200 </HttpStatusCode> <Data> <TotalCount> 100 </TotalCount> <PageSize> 10 </PageSize> <PageNumber> 1 </PageNumber> <AlertMessages> <AlertUser> alarm recipient </AlertUser> <AlertMessageStatus> READY_TO_SEND </AlertMessageStatus> <RemindId> 9527 </RemindId> <AlertId> 9527 </AlertId> <Content> node error </Content> <AlertMethod> SMS </AlertMethod> <AlertTime> 1553531401000 </AlertTime> <Source> remind_alert </Source> <RemindName> custom monitoring-data sources rule name </RemindName> </AlertMessages> <AlertMessages> <Instances> <Status> not_run </Status> <NodeName> Node name </NodeName> <InstanceId> 95279527 </InstanceId> <NodeId> 1234 </NodeId> <ProjectId> 1234 </ProjectId> </Instances> <Instances> <TopicOwner> 9527952795 **** </TopicOwner> <InstanceId> 12345 </InstanceId> <NodeId> 1234 </NodeId> <TopicId> 1234 </TopicId> <TopicStatus> FIXING </TopicStatus> <TopicName> 9527 error </TopicName> </Instances> <Instances> <Owner> 12345 </Owner> <NodeName> node name </NodeName> <NodeId> 1234 </NodeId> <ProjectId> 1234 </ProjectId> </Instances> <Topics> <Status> not_run </Status> <NodeName> node name </NodeName> <InstanceId> 12345 </InstanceId> <NodeId> 1234 </NodeId> <ProjectId> 1234 </ProjectId> </Topics> <Topics> <TopicOwner> 95279527 **** </TopicOwner> <InstanceId> 95279527 </InstanceId> <NodeId> 9527 </NodeId> <TopicId> 9527 </TopicId> <TopicStatus> FIXING </TopicStatus> <TopicName> 9527 error </TopicName> </Topics> <Topics> <Owner> 95279527**** </Owner> <NodeName> node name </NodeName> <NodeId> 9527 </NodeId> <ProjectId> 9527 </ProjectId> </Topics> <Nodes> <Status> not_run </Status> <NodeName> node name </NodeName> <InstanceId> 95279527 </InstanceId> <NodeId> 9527 </NodeId> <ProjectId> 9527 </ProjectId> </Nodes> <Nodes> <TopicOwner> 95279527 **** </TopicOwner> <InstanceId> 95279527 </InstanceId> <NodeId> 9527 </NodeId> <TopicId> 9527 </TopicId> <TopicStatus> FIXING </TopicStatus> <TopicName> error </TopicName> 9527 </Nodes> <Nodes> 95279527 <Owner> *** </Owner> <NodeName> node name </NodeName> <NodeId> 9527 </NodeId> <ProjectId> 9527 </ProjectId> </Nodes> </AlertMessages> <AlertMessages> <SlaAlert> <BaselineId> 9527 </BaselineId> <Status> SAFE </Status> <BaselineOwner> 95279527**** </BaselineOwner> <BaselineName> enter the </BaselineName> <ProjectId> 9527 </ProjectId> <Bizdate> 1553443200000 </Bizdate> <InGroupId> 1 </InGroupId> </SlaAlert> </AlertMessages> </Data> <ErrorCode> 1031203110005 </ErrorCode> <ErrorMessage> The specified parameters are invalid. </ErrorMessage> <Success>true</Success> 
   

JSON Hint


     {"RequestId": "0000-abcd-EFG ******", "HttpStatusCode": 200, "Data": { "TotalCount": 100, "PageSize": 10, "PageNumber": 1, "AlertMessages": [ { "AlertUser": "Alarm recipient", "AlertMessageStatus": "READY_TO_SEND", "" Memordid ": 9527, " AlertId ": 9527, " Content ": " The node does not respond ", " AlertMethod ": " SMS ", " AlertTime ": 15such as discussed in this document," Source ": " memord_alert ", " memordname ": " name of a custom monitoring rule "},{" Instances ": [ { " Status ": " NOT_RUN ", " NodeName ": " Name of the node ", " InstanceId ": 95279527, " NodeId ": 1234, " ProjectId ": 1234 }, { " TopicOwner ": " 9527952795 // parameter values * ", " InstanceId ": 12345, " NodeId ": 1234," TopicId ": 1234," TopicStatus ": " FIXING ", " TopicName ": " Error 9527 " }, { " Owner ": 534, Noame": "" Node Name ", " NodeId ": 1234, " ProjectId ": 1234 } ], " Topics ": [ { " Status ": " NOT_RUN ", " NodeName ": " node name ", " InstanceId ": 12345, " NodeId ": 1234," ProjectId": 1234 }, { "topidowner": "node95279527 * Memory", "InstanceId": 95279527, "NodeId": 9527, "TopicId": 9527, "TopicStatus": "FIXING", "TopicName": "error with 9527" },{ "Owner": "95279527 ${*", "nodeame": "node name", "NodeId": 9527, "ProjectId": 9527 } ], "Nodes": [ { "Status": "NOT_RUN", "NodeName": "node name", " InstanceId ": //" NodeId ": 9527, " ProjectId ": 9527 },{" TopicOwner ": " 95279527 ${* ", " InstanceId ": 95279527, " NodeId ": 9527, " TopicId ": 9527, " TopicStatus ": " FIXING ", " TopicName ", " 9527} {"Owner": "95279527 {Owner *", " NodeName ": " node name ", " NodeId ": 9527, " ProjectId ": 9527 } ] }, { " SlaAlert ": { " BaselineId ": 9527, " Status ": " SAFE ", " BaselineOwner ": " 95279527 timknew entry * ", " BaselineName ": " baseline name ", " ProjectId ": 9527, " Bizdate ": 1523443200,000," InGroupId ": 1 } } ] }, "ErrorCode": 1031203110005, "ErrorMessage": "The specified parameters are invalid.", "Success": true} 
   

Error codes

HttpCode Error code Error message Description
403 Forbidden.Access Access is forbidden. Activate DataWorks first. Your access is restricted, possibly because you have not activated DataWorks.
500 Forbidden.Not.Server The dataworksAPI service is not available in this area. Please try it in another area. DataWorks API service is not available in this region. Please try another region.
500 InternalError.System An internal system error occurred. Try again later. An internal system error occurred. Please try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. An internal system error occurred. Please try again later.
500 InternalError.Wkbench.ServiceError An internal error occurred. The service was open.
500 Invalid.Wkbench.Parameter The specified parameters are invalid. The error message returned because the request contains invalid parameters.
403 ResourceNotAuthorized.Api You are not authorized to access the resources. You cannot access resources without authorization.
429 Throttling.Api The request for this resource has exceeded your available limit. The request for the resource exceeds your available upper limit.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit. The request for the resource has exceeded your daily availability limit.
429 Throttling.Resource You have reached the limit for the resource. Please contact us by submitting a ticket. The number of resources has reached the upper limit. Submit a ticket.
429 Throttling.System The DataWorks system is busy. Try again later. DataWorks the system is busy, please try again later.
429 Throttling.User Your request is too frequent. Try again later. Your request is too frequent, please try to slow down the request speed.

Go to the Error CenterFor more information, see error codes.