ALIYUN::DTS::JobMonitorRule类型用于创建任务告警规则。
语法
{
"Type": "ALIYUN::DTS::JobMonitorRule",
"Properties": {
"DtsJobId": String,
"Type": String,
"DelayRuleTime": Integer,
"Phones": List,
"Period": Integer,
"State": String,
"Times": Integer
}
}属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
DtsJobId | String | 是 | 否 | 迁移、同步或订阅任务 ID。 | 无 |
Type | String | 是 | 否 | 监控规则类型。 | 取值:
|
DelayRuleTime | Integer | 否 | 是 | 触发延迟告警的阈值。 | 单位:秒。 |
Period | Integer | 否 | 是 | 增量验证任务的统计周期。 | 单位:分钟。 说明 当前支持的值为 1 分钟、3 分钟、5 分钟和 30 分钟。 |
Phones | List | 否 | 是 | 告警触发后通知联系人电话号码。 | 无 |
State | String | 否 | 是 | 是否启用监控规则。 | 取值:
|
Times | Integer | 否 | 是 | 增量验证任务的周期数。 | 无 |
返回值
Fn::GetAtt
Type:监控规则类型,返回值。
DtsJobId:迁移、同步或订阅任务 ID,可通过调用查询DTS任务列表及各任务执行详情接口获取。
Phones:告警触发后通知联系人电话号码,多个电话号码之间用逗号(,)分隔。
State:是否启用监控规则,返回值。
Times:增量验证任务的周期数。
Period:增量验证任务的统计周期,单位:分钟。
DelayRuleTime:触发延迟告警的阈值,单位:秒。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DelayRuleTime:
Description:
en: Trigger delay alarm threshold, which is measured in seconds.
Required: false
Type: Number
DtsJobId:
Description:
en: Migration, synchronization or subscription task ID can be by calling the DescribeDtsJobs get.
Required: true
Type: String
Period:
AllowedValues:
- 1
- 3
- 5
- 30
AssociationProperty: PayPeriod
Description:
en: 'The statistical period of the incremental verification task. Unit: minutes.'
Required: false
Type: Number
Phones:
Description:
en: The alarm is triggered after notification of the contact phone number.
MaxLength: 10
MinLength: 0
Required: false
Type: Json
State:
AllowedValues:
- Y
- N
Default: Y
Description:
en: 'Whether to enable monitoring rules, return value:
- **Y**: enable.
- **N**: Inactive.'
Required: false
Type: String
Times:
Description:
en: The number of cycles of the incremental verification task.
Required: false
Type: Number
Type:
AllowedValues:
- delay
- error
Description:
en: 'Monitoring rules of type, the return value:
- **delay**: delay alarm.
- **error**: abnormal alarm.'
Required: true
Type: String
Resources:
ExtensionResource:
Properties:
DelayRuleTime:
Ref: DelayRuleTime
DtsJobId:
Ref: DtsJobId
Period:
Ref: Period
Phones:
Ref: Phones
State:
Ref: State
Times:
Ref: Times
Type:
Ref: Type
Type: ALIYUN::DTS::JobMonitorRule
Outputs:
DelayRuleTime:
Description: Trigger delay alarm threshold, which is measured in seconds.
Value:
Fn::GetAtt:
- ExtensionResource
- DelayRuleTime
DtsJobId:
Description: Migration, synchronization or subscription task ID can be by calling
the DescribeDtsJobs get.
Value:
Fn::GetAtt:
- ExtensionResource
- DtsJobId
Period:
Description: 'The statistical period of the incremental verification task. Unit:
minutes.'
Value:
Fn::GetAtt:
- ExtensionResource
- Period
Phones:
Description: The alarm is triggered after notification of the contact phone number,
A plurality of phone numbers between them with a comma (,) to separate.
Value:
Fn::GetAtt:
- ExtensionResource
- Phones
State:
Description: Whether to enable monitoring rules, return value:.
Value:
Fn::GetAtt:
- ExtensionResource
- State
Times:
Description: The number of cycles of the incremental verification task.
Value:
Fn::GetAtt:
- ExtensionResource
- Times
Type:
Description: Monitoring rules of type, the return value:.
Value:
Fn::GetAtt:
- ExtensionResource
- Type
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Type": {
"Type": "String",
"Description": {
"en": "Monitoring rules of type, the return value:\n- **delay**: delay alarm.\n- **error**: abnormal alarm."
},
"AllowedValues": [
"delay",
"error"
],
"Required": true
},
"DtsJobId": {
"Type": "String",
"Description": {
"en": "Migration, synchronization or subscription task ID can be by calling the DescribeDtsJobs get."
},
"Required": true
},
"Phones": {
"Type": "Json",
"Description": {
"en": "The alarm is triggered after notification of the contact phone number."
},
"Required": false,
"MinLength": 0,
"MaxLength": 10
},
"State": {
"Type": "String",
"Description": {
"en": "Whether to enable monitoring rules, return value:\n- **Y**: enable.\n- **N**: Inactive."
},
"AllowedValues": [
"Y",
"N"
],
"Required": false,
"Default": "Y"
},
"Times": {
"Type": "Number",
"Description": {
"en": "The number of cycles of the incremental verification task."
},
"Required": false
},
"Period": {
"Type": "Number",
"AssociationProperty": "PayPeriod",
"Description": {
"en": "The statistical period of the incremental verification task. Unit: minutes.\n> currently supported values are 1 minute, 3 minutes, 5 minutes and 30 minutes."
},
"AllowedValues": [
1,
3,
5,
30
],
"Required": false
},
"DelayRuleTime": {
"Type": "Number",
"Description": {
"en": "Trigger delay alarm threshold, which is measured in seconds."
},
"Required": false
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::DTS::JobMonitorRule",
"Properties": {
"Type": {
"Ref": "Type"
},
"DtsJobId": {
"Ref": "DtsJobId"
},
"Phones": {
"Ref": "Phones"
},
"State": {
"Ref": "State"
},
"Times": {
"Ref": "Times"
},
"Period": {
"Ref": "Period"
},
"DelayRuleTime": {
"Ref": "DelayRuleTime"
}
}
}
},
"Outputs": {
"Type": {
"Description": "Monitoring rules of type, the return value:.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Type"
]
}
},
"DtsJobId": {
"Description": "Migration, synchronization or subscription task ID can be by calling the DescribeDtsJobs get.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DtsJobId"
]
}
},
"Phones": {
"Description": "The alarm is triggered after notification of the contact phone number, A plurality of phone numbers between them with a comma (,) to separate.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Phones"
]
}
},
"State": {
"Description": "Whether to enable monitoring rules, return value.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"State"
]
}
},
"Times": {
"Description": "The number of cycles of the incremental verification task.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Times"
]
}
},
"Period": {
"Description": "The statistical period of the incremental verification task. Unit: minutes.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Period"
]
}
},
"DelayRuleTime": {
"Description": "Trigger delay alarm threshold, which is measured in seconds.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DelayRuleTime"
]
}
}
}
}
该文章对您有帮助吗?