All Products
Search
Document Center

DataWorks:GetAlertMessage

Last Updated:Nov 21, 2024

Queries alert information based on the alert ID that is specified by the AlertId parameter.

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

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
AlertIdstringYes

The alert ID. You can all the ListAlertMessages operation to obtain the alert ID.

1421

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

0000-ABCD-EFG****
HttpStatusCodeinteger

The HTTP status code.

200
ErrorMessagestring

The error message.

The specified parameters are invalid.
ErrorCodestring

The error code.

Invalid.Tenant.ConnectionNotExists
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Dataobject

The details of the returned data.

RemindIdlong

The ID of the custom alert rule that was triggered. This parameter is returned if the value of the Source parameter is REMIND_ALERT.

1234
AlertMessageStatusstring

The sending status of the notification. Valid values:

  • READY_TO_SEND: The notification is waiting to be sent.
  • SEND_FAIL: The notification fails to be sent.
  • SEND_SUCCESS: The notification is sent.
  • SEND_OVERLIMIT: The number of notifications that are sent exceeds the upper limit.
READY_TO_SEND
AlertUserstring

The ID of the Alibaba Cloud account used by the alert recipient.

9527952795****
AlertTimelong

The time when the alert was reported.

1553524393000
AlertMethodstring

The notification method. Valid values:

  • MAIL.
  • SMS.
  • PHONE. Only DataWorks Professional Edition and more advanced editions support the PHONE notification method.
SMS
Sourcestring

The type of the alert. Valid values:

  • REMIND_ALERT: The alert is a custom alert.
  • TOPIC_ALERT: The alert is an event alert.
  • SLA_ALERT: The alert is a baseline alert.
  • NODE_CYCLE_ALERT: The alert is reported for a node dependency loop.
  • NODE_LONELY_ALERT: The alert is reported for isolated nodes.
REMIND_ALERT
Contentstring

The content of the alert.

RemindNamestring

The name of the custom alert rule that was triggered. This parameter is returned if the value of the Source parameter is REMIND_ALERT.

AlertIdlong

The alert ID.

123
Instancesarray<object>

The instances that triggered the custom alert rule. This parameter is returned if the value of the Source parameter is REMIND_ALERT. This parameter is left empty if the value of the Source parameter is not REMIND_ALERT.

Instanceobject
Statusstring

The status of the instance. Valid values:

  • NOT_RUN
  • WAIT_TIME
  • WAIT_RESOURCE
  • RUNNING
  • CHECKING
  • CHECKING_CONDITION
  • FAILURE
  • SUCCESS
NOT_RUN
InstanceIdlong

The instance ID.

12312312
NodeNamestring

The name of the node.

NodeIdlong

The node ID.

1234
ProjectIdlong

The ID of the workspace to which the node belongs.

1234
Topicsarray<object>

The events that triggered alerts. This parameter is returned if the value of the Source parameter is TOPIC_ALERT. This parameter is left empty if the value of the Source parameter is not TOPIC_ALERT.

Topicobject
TopicNamestring

The name of the event.

InstanceIdlong

The ID of the instance that triggered the event.

12345
TopicIdlong

The event ID.

412431
TopicOwnerstring

The ID of the Alibaba Cloud account used by the event owner.

9527952795****
NodeIdlong

The ID of the node that triggered the event.

1234
TopicStatusstring

The status of the event. Valid values:

  • IGNORE
  • NEW
  • FIXING
  • RECOVER
FIXING
Nodesarray<object>

The nodes returned for different alert sources. The nodes that form a loop are returned if the value of the Source parameter is NODE_CYCLE_ALERT. The nodes that are isolated are returned if the value of the Source parameter is NODE_LONELY_ALERT.

Nodeobject
Ownerstring

The ID of the Alibaba Cloud account used by the node owner.

95279527952****
NodeNamestring

The name of the node.

NodeIdlong

The node ID.

1234
ProjectIdlong

The ID of the workspace to which the node belongs.

1234
SlaAlertobject

The basic information about the baseline instance that triggered an alert. This parameter is returned if the value of the Source parameter is SLA_ALERT. This parameter is left empty if the value of the Source parameter is not SLA_ALERT.

Statusstring

The status of the baseline. Valid values:

  • ERROR
  • SAFE
  • DANGEROUS
  • OVER
SAFE
BaselineOwnerstring

The ID of the Alibaba Cloud account used by the baseline owner. Multiple IDs are separated by commas (,).

952795279****
BaselineIdlong

The baseline ID.

15142123
BaselineNamestring

The name of the baseline.

Bizdatelong

The data timestamp of the baseline instance.

1553443200000
ProjectIdlong

The ID of the workspace to which the baseline belongs.

1234
InGroupIdinteger

The ID of the cycle of the baseline instance. Valid values of the ID of an hour-level cycle: [1,24]. The ID of a day-level cycle is 1.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "0000-ABCD-EFG****",
  "HttpStatusCode": 200,
  "ErrorMessage": "The specified parameters are invalid.",
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
  "Success": true,
  "Data": {
    "RemindId": 1234,
    "AlertMessageStatus": "READY_TO_SEND",
    "AlertUser": "9527952795****",
    "AlertTime": 1553524393000,
    "AlertMethod": "SMS",
    "Source": "REMIND_ALERT",
    "Content": "",
    "RemindName": "",
    "AlertId": 123,
    "Instances": [
      {
        "Status": "NOT_RUN",
        "InstanceId": 12312312,
        "NodeName": "",
        "NodeId": 1234,
        "ProjectId": 1234
      }
    ],
    "Topics": [
      {
        "TopicName": "",
        "InstanceId": 12345,
        "TopicId": 412431,
        "TopicOwner": "9527952795****",
        "NodeId": 1234,
        "TopicStatus": "FIXING"
      }
    ],
    "Nodes": [
      {
        "Owner": "95279527952****",
        "NodeName": "",
        "NodeId": 1234,
        "ProjectId": 1234
      }
    ],
    "SlaAlert": {
      "Status": "SAFE",
      "BaselineOwner": "952795279****",
      "BaselineId": 15142123,
      "BaselineName": "",
      "Bizdate": 1553443200000,
      "ProjectId": 1234,
      "InGroupId": 1
    }
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history