Subscribe to event notifications
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
-
Log in to the CloudMonitor console.
-
In the left-side navigation pane, choose .
-
On the Subscription Policy tab, click Create Subscription Policy.
-
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.
NoteFor 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.
-
-
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
-
Log in to the CloudMonitor console.
-
In the left-side navigation pane, choose .
On the Subscription Policy tab, click Test Event Subscription.
-
In the Create Event Debugging panel, configure the debug event.
-
For Product, select Data Transmission Service.
-
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.
-
-
You can modify the debug content.
For an example, see Event content examples.
-
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. |
|
|
resourceId |
The affected resource. Note
By default, the value starts with |
|
|
level |
The severity level of the system event.
|
|
|
instanceName |
The name of the affected instance, in the format |
|
|
regionId |
The region of the instance. |
|
|
name |
The name of the system event. |
|
|
content |
The content of the system event. |
|
|
msg |
||
|
status |
The status of the system event.
|
|
Examples
|
Name |
Content example |
|
Synchronization task abnormal |
|
|
Synchronization task recovered |
|
|
Migration task abnormal |
|
|
Migration task recovered |
|
|
Subscription task abnormal |
|
|
Subscription task recovered |
|
Instance task
Parameters
|
Parameter |
Description |
Example value |
|
product |
The cloud product for the system event. |
|
|
resourceId |
The affected resource. Note
By default, the value starts with |
|
|
level |
The severity level of the system event. Note
For instance task exceptions, the severity level is always WARN. |
|
|
instanceName |
The name of the affected instance, in |
|
|
regionId |
The region of the instance. |
|
|
name |
The name of the system event. |
|
|
content |
The content of the system event. |
|
|
eventId |
The ID of the event. |
|
|
publishTime |
The UTC time when the system event was published. |
|
|
reason |
The reason the system event was triggered. |
|
|
product |
The cloud product for the system event. |
|
|
instanceComment |
The ID of the affected instance. The |
|
|
instanceId |
||
|
extra |
Additional information about the event. |
|
|
eventTime |
The UTC start time of the system event. |
|
|
cloudEvent |
The event information from CloudMonitor. |
|
|
data |
An overview of the event data. |
|
|
gmtModified |
The UTC time when the event was updated. |
|
|
eventCategory |
The event category. Note
For instance task exceptions, the event category is always Exception. |
|
|
gmtCreated |
The UTC time when the event was created. |
|
|
detailReason |
The detailed reason for the event. |
|
|
uid |
The Alibaba Cloud account ID. |
|
|
cmsProduct |
The cloud product for the event. |
|
|
instanceId |
The ID of the affected instance. |
|
|
eventLevel |
The severity level of the event. Note
For instance task exceptions, the severity level is always WARN. |
|
|
handleStatus |
The processing status of the event. |
|
|
startTime |
The UTC start time of the event. |
|
|
detailImpact |
The detailed impact of the event. |
|
|
eventId |
The ID of the event. |
|
|
product |
The cloud product for the event. |
|
|
dbType |
||
|
hasLifeCycle |
Indicates whether the event has a lifecycle.
|
|
|
eventType |
The event type. |
|
|
eventReason |
The source of the event. |
|
|
eventImpact |
The impact of the event. |
|
|
mainEventId |
The ID of the main event. |
|
|
eventCode |
The event code, which is the same as the |
|
|
isClosed |
Indicates whether the event is closed.
|
|
|
regionId |
The region of the instance. |
|
|
sourceType |
The type of the source data. |
|
|
eventStatus |
The status of the system event.
|
|
|
endTime |
The UTC end time of the event. |
|
|
eventDetail |
Detailed information about the event. This may include the task type ( |
|
|
resourceType |
The resource type.
|
|
|
subject |
The affected resource. Note
By default, the value starts with |
|
|
specversion |
The CloudEvents protocol version. |
|
|
time |
The UTC time when the event was created. |
|
|
source |
The source of the event. |
|
|
ID |
The ID of the event. |
|
|
region |
The region of the instance. |
|
|
type |
The event type. |
|
|
region |
The region of the instance. |
|
|
instanceType |
The resource type.
|
|
|
eventType |
The event type. |
|
|
status |
The status of the system event.
|
|
Examples
|
Name |
Example content |
|
Recovery from an instance task exception |
|
|
Occurrence of an instance task exception |
|
Task relocation due to hardware upgrade
Parameters
|
Parameter |
Description |
Value |
|
product |
The cloud product associated with the system event. |
|
|
userId |
The Alibaba Cloud account ID. |
|
|
level |
The severity level of the system event.
|
|
|
resourceId |
The affected resource. Note
The value starts with |
|
|
instanceName |
The name of the affected instance, in the format |
|
|
dryRun |
Specifies whether to perform a dry run.
|
|
|
ver |
The CloudEvents protocol version. |
|
|
trace |
The request ID. |
|
|
name |
The name of the system event. |
|
|
regionId |
The region of the instance. |
|
|
status |
The status of the system event.
|
|
|
time |
The time when the system event occurred. |
|
|
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). |
|
Examples
|
Parameter |
Content example |
|
Task relocation due to underlying hardware upgrade (Scheduled) |
|
|
Task relocation due to underlying hardware upgrade (Executing) |
|
|
Task relocation due to underlying hardware upgrade (Executed) |
|
|
Task relocation due to underlying hardware upgrade (Failed) |
|
|
Task relocation due to underlying hardware upgrade (Canceled) |
|
|
Task relocation due to underlying hardware upgrade (ToDealt) |
|