Creates or modifies an alert rule for a Data Transmission Service (DTS) task.
DTS provides the following metrics for DTS tasks:
- Latency: DTS monitors the latency of a DTS task. If the latency of the task exceeds the specified threshold, an alert is triggered. Unit: seconds.
- Status: DTS monitors the status of a DTS task. If the state of the task changes to Error or Restore, an alert is triggered.
- Full Timeout: DTS monitors the duration of a DTS task. If the duration of the task exceeds the specified threshold, an alert is triggered. Unit: hours.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateJobMonitorRule | The operation that you want to perform. Set the value to CreateJobMonitorRule. |
DtsJobId | String | Yes | i03e3zty16i**** | The ID of the data migration, data synchronization, or change tracking task. You can call the DescribeDtsJobs operation to query the task ID. |
Type | String | No | delay | The metric that is used to monitor the task. Valid values:
Default value: error. You must manually set this value. |
State | String | No | Y | Specifies whether to enable the alert rule. Valid values:
Default value: Y. |
Phone | String | No | 1361234****,1371234**** | The mobile numbers that receive alert notifications. Separate multiple mobile numbers with commas (,). Note
|
DelayRuleTime | Long | No | 11 | The threshold for triggering latency alerts.
Note This parameter is required if the Type parameter is set to delay or full_timeout and the State parameter is set to Y. |
RegionId | String | No | cn-hangzhou | The region ID of the DTS instance. For more information, see List of supported regions. |
Period | Integer | No | 5 | The statistical period of the incremental data verification task. Unit: minutes. Note Valid values: 1, 5, 10, and 30. |
Times | Integer | No | 2 | The number of statistical periods of the incremental data verification task. |
NoticeValue | Integer | No | 2 | The alert threshold. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
HttpStatusCode | Integer | 200 | The HTTP status code. |
RequestId | String | 8C498360-7892-433C-847A-BA71A850**** | The ID of the request. |
DtsJobId | String | i03e3zty16i**** | The ID of the data migration, data synchronization, or change tracking task. |
ErrCode | String | 403 | The error code returned if the call failed. |
Success | Boolean | true | Indicates whether the request was successful. Valid values:
|
ErrMessage | String | The Value of Input Parameter %s is not valid. | The error message returned if the request failed. |
Code | String | 200 | The error code. This parameter will be removed in the future. |
DynamicMessage | String | DtsJobId | The dynamic part in the error message. The value of this parameter is used to replace the %s variable in the value of the ErrMessage parameter. Note For example, if the specified DtsJobId parameter is invalid, The Value of Input Parameter %s is not valid is returned for ErrMessage and DtsJobId is returned for DynamicMessage. |
Examples
Sample requests
http(s)://dts.aliyuncs.com/?Action=CreateJobMonitorRule
&DtsJobId=i03e3zty16i****
&Type=delay
&State=Y
&Phone=1361234****,1371234****
&DelayRuleTime=11
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateJobMonitorRuleResponse>
<RequestId>8C498360-7892-433C-847A-BA71A850****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Success>true</Success>
<DtsJobId>i03e3zty16i****</DtsJobId>
</CreateJobMonitorRuleResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "8C498360-7892-433C-847A-BA71A850****",
"HttpStatusCode" : 200,
"Success" : true,
"DtsJobId" : "i03e3zty16i****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | Throttling.User | Request was denied due to user flow control. | The error message returned because the number of requests reaches the threshold, and the request is rejected. Try again later. |
500 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The error message returned because the response of the server timed out or the server was unavailable. Try again. If the error persists, contact technical support. |
403 | InvalidSecurityToken.Expired | Specified SecurityToken is expired. | The error message returned because the signature expired. Use a new signature. |
For a list of error codes, see Service error codes.