Subscribe to event notifications

Updated at:

The DTS integration with CloudMonitor lets you set custom alert notifications for important events through event subscription. This helps you stay informed of event status in real time and quickly analyze and locate issues if a service fails.

Background

CloudMonitor is a service that monitors Alibaba Cloud resources and internet applications. When a system exception, such as a product failure, occurs, CloudMonitor notifies you promptly, allowing you to automate exception handling.

  • Sends alerts through SMS, email, and a DingTalk chatbot.

  • Distributes events to Simple Message Queue (formerly MNS), Function Compute, URL callback, and Log Service, allowing you to automate exception handling.

Prerequisites

  • Log on to the Message Center and ensure that you enable notifications for ApsaraDB Fault or Maintenance Notifications and configure a recipient. We recommend that you set the database O&M administrator as the recipient. Otherwise, you will not receive these notifications.

  • Create alert contacts and alert contact groups, and then add the contacts to these groups. For instructions, see Create an alert contact or an alert contact group.

Create a subscription policy

  1. Log in to the CloudMonitor console.

  2. In the left-side navigation pane, choose Event Center > Event Subscription.

  3. On the Subscription Policy tab, click Create Subscription Policy.

  4. On the Create Subscription Policy page, configure the parameters.

    • If you set Subscription Type to System Events, select Data Transmission Service for Product in the Subscription Scope section.

      Note

      For a list of system events that DTS supports, see System events.

    • If you set Subscription Type to Threshold Events, search for and select DTS in the Product Classification section.

    Configure the other parameters as needed. For more information, see Subscription policy parameters.

  5. After you configure the policy, click Submit.

    To view, modify, or delete a subscription policy, see Manage event subscription policies (recommended).

Debug an event subscription

  1. Log in to the CloudMonitor console.

  2. In the left-side navigation pane, choose Event Center > Event Subscription.

  3. On the Subscription Policy tab, click Test Event Subscription.

  4. In the Create Event Debugging panel, configure the debug event.

    1. For Product, select Data Transmission Service.

    2. Select a Name.

      Note
      • The Name is the NameDesc of the system event.

      • You cannot debug Task Relocation Due To Underlying Hardware Upgrade events and Instance Task Latency events.

      The system automatically generates the debug content in JSON format.

    3. You can modify the debug content.

      For an example, see Event content examples.

  5. Click OK.

    An operation is successful message is displayed. Cloud Monitor automatically sends a test alert notification to the alert contacts based on the notification method in the subscription policy.

Event content

Synchronization, migration, and subscription tasks

Parameters

Parameter

Description

Example value

product

The cloud product for the system event.

DTS

resourceId

The affected resource.

Note

By default, the value starts with acs:dts: and may include the region, Alibaba Cloud account ID, and instance ID.

acs:dts:cn-hangzhou:135218574272****:instance/dtsb1gx8vo2265****

level

The severity level of the system event.

  • CRITICAL : Critical.

  • INFO: Informational.

INFO

instanceName

The name of the affected instance, in the format <Task ID>/<Instance Name>.

f1es8k10220****/testsync

regionId

The region of the instance.

cn-hangzhou

name

The name of the system event.

sync_job_restore

content

The content of the system event.

testcontent

msg

status

The status of the system event.

  • failed: The task is abnormal.

  • restore: The task is recovered.

restore

Examples

Name

Content example

Synchronization task abnormal

{
    "product": "DTS",
    "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsb1gx8vo2265****",
    "level": "CRITICAL",
    "instanceName": "f1es8k10220****/testsync",
    "regionId": "cn-hangzhou",
    "name": "sync_job_abnormal",
    "content": "testcontent",
    "status": "failed"
}

Synchronization task recovered

{
    "product": "DTS",
    "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsb1gx8vo2265****",
    "level": "INFO",
    "instanceName": "f1es8k10220****/testsync",
    "regionId": "cn-hangzhou",
    "name": "sync_job_restore",
    "content": "testcontent",
    "status": "restore"
}

Migration task abnormal

{
    "product": "DTS",
    "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsb1ah8a7x259****",
    "level": "CRITICAL",
    "instanceName": "q2rb8x0022p****/testmigrate",
    "regionId": "cn-hangzhou",
    "name": "migration_job_abnormal",
    "content": "testcontent",
    "status": "failed"
}

Migration task recovered

{
    "product": "DTS",
    "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsb1ah8a7x259****",
    "level": "INFO",
    "instanceName": "q2rb8x0022p****/testmigrate",
    "regionId": "cn-hangzhou",
    "name": "migration_job_restore",
    "content": "testcontent",
    "status": "restore"
}

Subscription task abnormal

{
    "product": "DTS",
    "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsktuw8d7n252****",
    "level": "CRITICAL",
    "instanceName": "qgkm8okq25q****/testsubscribe",
    "regionId": "cn-hangzhou",
    "name": "subscribe_job_abnormal",
    "content": "testcontent",
    "status": "failed"
}

Subscription task recovered

{
    "product": "DTS",
    "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsktuw8d7n252****",
    "level": "INFO",
    "instanceName": "qgkm8okq25q****/testsubscribe",
    "regionId": "cn-hangzhou",
    "name": "subscribe_job_restore",
    "content": {
        "msg": "testcontent"
    },
    "status": "restore"
}

Instance task

Parameters

Parameter

Description

Example value

product

The cloud product for the system event.

DTS

resourceId

The affected resource.

Note

By default, the value starts with acs:dts: and can include the region, Alibaba Cloud account ID, and the instance ID.

acs:dts:cn-hangzhou:135218574272****:instance/dtsb1gx8vo2265****

level

The severity level of the system event.

Note

For instance task exceptions, the severity level is always WARN.

WARN

instanceName

The name of the affected instance, in <task ID>/<instance name> format.

f1es8k10220****/testsync

regionId

The region of the instance.

cn-hangzhou

name

The name of the system event.

Instance:JobStatus.Abnormal:Executing

content

The content of the system event.

{...}

eventId

The ID of the event.

37d28e238b151a0d44dfdf1f2153****

publishTime

The UTC time when the system event was published.

2025-08-26T14:40:05+08:00

reason

The reason the system event was triggered.

testreason

product

The cloud product for the system event.

DTS

instanceComment

The ID of the affected instance. The instanceComment and instanceId parameters both specify this value.

dtsb1gx8vo2265****

instanceId

extra

Additional information about the event.

{...}

eventTime

The UTC start time of the system event.

2025-08-26T14:38:17+08:00

cloudEvent

The event information from CloudMonitor.

{...}

data

An overview of the event data.

{...}

gmtModified

The UTC time when the event was updated.

2025-08-26T06:39:56Z

eventCategory

The event category.

Note

For instance task exceptions, the event category is always Exception.

Exception

gmtCreated

The UTC time when the event was created.

2025-08-26T06:39:37Z

detailReason

The detailed reason for the event.

****

uid

The Alibaba Cloud account ID.

135216572282****

cmsProduct

The cloud product for the event.

DTS

instanceId

The ID of the affected instance.

dtsb1gx8vo2265****

eventLevel

The severity level of the event.

Note

For instance task exceptions, the severity level is always WARN.

WARN

handleStatus

The processing status of the event.

None

startTime

The UTC start time of the event.

2025-08-26T06:38:17Z

detailImpact

The detailed impact of the event.

-

eventId

The ID of the event.

e-0mqwjyhomzrb32****

product

The cloud product for the event.

dts

dbType

hasLifeCycle

Indicates whether the event has a lifecycle.

  • 0: The event does not have a lifecycle.

  • 1: The event has a lifecycle.

0

eventType

The event type.

JobStatus

eventReason

The source of the event.

JobStatus.Abnormal

eventImpact

The impact of the event.

Abnormal

mainEventId

The ID of the main event.

e-0mqwjyhomzrb3i****

eventCode

The event code, which is the same as the name.

Instance:JobStatus.Abnormal:Executing

isClosed

Indicates whether the event is closed.

  • 0: Open.

  • 1: Closed.

1

regionId

The region of the instance.

cn-hangzhou

sourceType

The type of the source data.

DBaaS

eventStatus

The status of the system event.

  • Executing: The task is experiencing an exception.

  • Executed: The task has recovered from the exception.

Executed

endTime

The UTC end time of the event.

2025-08-26T06:38:17Z

eventDetail

Detailed information about the event. This may include the task type (dts_task_type), task ID (dts_job_id), task status (job_state), error code (err_code), and detailed error messages (err_msg_detail and message).

****

resourceType

The resource type.

  • Instance: The resource is an instance.

  • Host: The resource is a host.

  • User: The resource is a user.

Instance

subject

The affected resource.

Note

By default, the value starts with acs:dts: and can include the region, Alibaba Cloud account ID, and the instance ID.

acs:dts:cn-hangzhou:135218574272****:instance/dtsb1gx8vo2265****

specversion

The CloudEvents protocol version.

1.0

time

The UTC time when the event was created.

2025-08-26T06:39:37Z

source

The source of the event.

acs:dts:dts

ID

The ID of the event.

e-0mqwjyhomzrb32****

region

The region of the instance.

cn-hangzhou

type

The event type.

Instance:JobStatus.Abnormal

region

The region of the instance.

cn-hangzhou

instanceType

The resource type.

  • Instance: The resource is an instance.

  • Host: The resource is a host.

  • User: The resource is a user.

Instance

eventType

The event type.

Exception

status

The status of the system event.

  • Executing: The task is experiencing an exception.

  • Executed: The task has recovered from the exception.

Executed

Examples

Name

Example content

Recovery from an instance task exception

{
    "product": "DTS",
    "resourceId": "dts:cn-hangzhou:135216572282****:instance/dtsb1gx8vo2265****",
    "level": "WARN",
    "instanceName": "f1es8k10220****/testsync",
    "regionId": "cn-hangzhou",
    "name": "Instance:JobStatus.Abnormal:Executed",
    "content": {
        "eventId": "b9b***3ae",
        "publishTime": "2025-08-26T04:59:37+08:00",
        "reason": "testreason",
        "product": "dts",
        "instanceComment": "dts***65u",
        "instanceId": "dts***65u",
        "extra": {
            "eventTime": "2025-08-26T04:21:37+08:00",
            "cloudEvent": {
                "data": {
                    "gmtModified": "202***32Z",
                    "eventCategory": "Ex***on",
                    "gmtCreated": "202***32Z",
                    "detailReason": "***",
                    "uid": "113***735",
                    "cmsProduct": "***",
                    "instanceId": "dts***65u",
                    "eventLevel": "WA***",
                    "handleStatus": "No***",
                    "startTime": "2025-08-25T20:21:37Z",
                    "detailImpact": "***",
                    "eventId": "e-0***iue",
                    "product": "***",
                    "dbType": "***",
                    "hasLifeCycle": 123456,
                    "eventType": "Jo***us",
                    "eventReason": "Job***mal",
                    "eventImpact": "Ab***al",
                    "mainEventId": "e-0***gd8",
                    "eventCode": "Ins***ted",
                    "isClosed": 123456,
                    "regionId": "cn***ng",
                    "sourceType": "DB***",
                    "eventStatus": "Ex***ed",
                    "endTime": "2025-08-25T20:21:37Z",
                    "eventDetail": "****",
                    "resourceType": "In***ce"
                },
                "subject": "acs***nce/dts***65u",
                "specversion": "***",
                "time": "2025-08-25T20:59:32Z",
                "source": "acs***dts",
                "id": "e-0***iue",
                "region": "cn***ng",
                "type": "Ins***mal"
            },
            "region": "cn-hangzhou"
        },
        "instanceType": "In***ce",
        "eventType": "Ex***on"
    },
    "status": "Executed"
}

Occurrence of an instance task exception

{
    "product": "DTS",
    "resourceId": "dts:cn-hangzhou:135216572282****:instance/dtsb1gx8vo2265****",
    "level": "WARN",
    "instanceName": "f1es8k10220****/testsync",
    "regionId": "cn-hangzhou",
    "name": "Instance:JobStatus.Abnormal:Executing",
    "content": {
        "eventId": "f88***4b3",
        "publishTime": "2025-08-26T05:03:38+08:00",
        "reason": "testreason",
        "product": "***",
        "instanceComment": "dts***b9n",
        "instanceId": "dts***b9n",
        "extra": {
            "eventTime": "2025-08-26T05:02:13+08:00",
            "cloudEvent": {
                "data": {
                    "gmtModified": "202***25Z",
                    "eventCategory": "Ex***on",
                    "gmtCreated": "202***25Z",
                    "detailReason": "***",
                    "uid": "125***870",
                    "cmsProduct": "***",
                    "instanceId": "dts***b9n",
                    "eventLevel": "WA***",
                    "handleStatus": "No***",
                    "startTime": "2025-08-25T21:02:13Z",
                    "detailImpact": "***",
                    "eventId": "e-0***ypw",
                    "product": "***",
                    "dbType": "***",
                    "hasLifeCycle": 123456,
                    "eventType": "Jo***us",
                    "eventReason": "Job***mal",
                    "eventImpact": "Ab***al",
                    "mainEventId": "e-0***cua",
                    "eventCode": "Ins***ing",
                    "isClosed": 123456,
                    "regionId": "cn-***hou",
                    "sourceType": "DB***",
                    "eventStatus": "Ex***ng",
                    "endTime": "2025-08-25T21:02:13Z",
                    "eventDetail": "****",
                    "resourceType": "In***ce"
                },
                "subject": "acs***nce/dts***b9n",
                "specversion": "***",
                "time": "2025-08-25T21:03:25Z",
                "source": "acs***dts",
                "id": "e-0***ypw",
                "region": "cn-***hou",
                "type": "Ins***mal"
            },
            "region": "cn-hangzhou"
        },
        "instanceType": "In***ce",
        "eventType": "Ex***on"
    },
    "status": "Executing"
}

Task relocation due to hardware upgrade

Parameters

Parameter

Description

Value

product

The cloud product associated with the system event.

DTS

userId

The Alibaba Cloud account ID.

135216572282****

level

The severity level of the system event.

  • CRITICAL : The event is critical.

  • INFO: The event is for informational purposes.

INFO

resourceId

The affected resource.

Note

The value starts with acs:dts: and includes information such as the region, Alibaba Cloud account ID, and instance ID.

acs:dts:cn-hangzhou:135216572282****:instance/dtsmq5j38bn28n****

instanceName

The name of the affected instance, in the format <instance ID>/<instance name>.

dtsmq5j38bn28n****/test

dryRun

Specifies whether to perform a dry run.

  • true: Sends a dry run request.

  • false: Sends a normal request.

false

ver

The CloudEvents protocol version.

1.0

trace

The request ID.

54ee8594-5ec4-408a-93ce-c8fbb433****

name

The name of the system event.

Instance:SystemMaintenance.Shift:Executed

regionId

The region of the instance.

cn-hangzhou

status

The status of the system event.

  • Scheduled: The event is scheduled.

  • Executing: The event is being executed.

  • Executed: The event has successfully completed.

  • Failed: The event failed.

  • Canceled: The event was canceled.

  • ToDealt: To be processed by the customer.

Executed

time

The time when the system event occurred.

Aug 22, 2025 5:39:51 PM

content

The content of the system event.

Note

This can include details such as the task or instance name (jobName), the estimated event execution time (innerScheduleTime), the instance ID (instanceId), and the region of the instance (region).

testcontent

Examples

Parameter

Content example

Task relocation due to underlying hardware upgrade (Scheduled)

{
  "product": "DTS",
  "userId": "135216572282****",
  "level": "CRITICAL",
  "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsmq5j38bn28n****",
  "instanceName": "dtsmq5j38bn28n****/testinstance",
  "dryRun": false,
  "ver": "1.0",
  "trace": "54ee8594-5ec4-408a-93ce-c8fbb433****",
  "name": "Instance:SystemMaintenance.Shift:Scheduled",
  "regionId": "cn-hangzhou",
  "status": "Scheduled",
  "time": "Aug 22, 2025 5:39:51 PM",
  "content": "testcontent"
}

Task relocation due to underlying hardware upgrade (Executing)

{
  "product": "DTS",
  "userId": "135216572282****",
  "level": "INFO",
  "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsmq5j38bn28n****",
  "instanceName": "dtsmq5j38bn28n****/testinstance",
  "dryRun": false,
  "ver": "1.0",
  "trace": "55ee8594-5ec4-408a-93ce-c8fac56****",
  "name": "Instance:SystemMaintenance.Shift:Executing",
  "regionId": "cn-hangzhou",
  "status": "Executing",
  "time": "Aug 22, 2025 5:39:51 PM",
  "content": "testcontent"
}

Task relocation due to underlying hardware upgrade (Executed)

{
  "product": "DTS",
  "userId": "135216572282****",
  "level": "INFO",
  "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsmq5j38bn28n****",
  "instanceName": "dtsmq5j38bn28n****/testinstance",
  "dryRun": false,
  "ver": "1.0",
  "trace": "56ee8594-5ec4-408a-93ce-c8fbac58****",
  "name": "Instance:SystemMaintenance.Shift:Executed",
  "regionId": "cn-hangzhou",
  "status": "Executed",
  "time": "Aug 22, 2025 5:39:51 PM",
  "content": "testcontent"
}

Task relocation due to underlying hardware upgrade (Failed)

{
  "product": "DTS",
  "userId": "135216572282****",
  "level": "CRITICAL",
  "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsmq5j38bn28n****",
  "instanceName": "dtsmq5j38bn28n****/testinstance",
  "dryRun": false,
  "ver": "1.0",
  "trace": "57ee8594-5ec4-408a-93ce-c8fac59****",
  "name": "Instance:SystemMaintenance.Shift:Failed",
  "regionId": "cn-hangzhou",
  "status": "Failed",
  "time": "Aug 22, 2025 5:39:51 PM",
  "content": "testcontent"
}

Task relocation due to underlying hardware upgrade (Canceled)

{
  "product": "DTS",
  "userId": "135216572282****",
  "level": "INFO",
  "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsmq5j38bn28n****",
  "instanceName": "dtsmq5j38bn28n****/testinstance",
  "dryRun": false,
  "ver": "1.0",
  "trace": "54ee8594-5ec4-408a-93ce-c8fbb433****",
  "name": "Instance:SystemMaintenance.Shift:Canceled",
  "regionId": "cn-hangzhou",
  "status": "Canceled",
  "time": "Aug 22, 2025 5:39:51 PM",
  "content": "testcontent"
}

Task relocation due to underlying hardware upgrade (ToDealt)

{
  "product": "DTS",
  "userId": "135216572282****",
  "level": "CRITICAL",
  "resourceId": "acs:dts:cn-hangzhou:135216572282****:instance/dtsmq5j38bn28n****",
  "instanceName": "dtsmq5j38bn28n****/testinstance",
  "dryRun": false,
  "ver": "1.0",
  "trace": "54ee8594-5ec4-408a-93ce-c8fbb433****",
  "name": "Instance:SystemMaintenance.Shift:ToDealt",
  "regionId": "cn-hangzhou",
  "status": "ToDealt",
  "time": "Aug 22, 2025 5:39:51 PM",
  "content": "testcontent"
}