ALIYUN::CMS::MetricRuleTemplate is used to create an alert template.
Syntax
{
"Type": "ALIYUN::CMS::MetricRuleTemplate",
"Properties": {
"AlertTemplates": List,
"Description": String,
"RestVersion": Integer,
"TemplateId": Integer,
"Name": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
AlertTemplates | List | No | Yes | The details of alert rules that are generated based on the alert template. | You can specify up to 200 alert rules. For more information, see AlertTemplates properties. |
Description | String | No | Yes | The description of the alert template. | None. |
RestVersion | Integer | No | No | The version of the alert template. | Default value: 0. |
TemplateId | Integer | No | No | The ID of the template to be cloned. | None. |
Name | String | Yes | No | The name of the alert template. | None. |
AlertTemplates syntax
"AlertTemplates": [
{
"MetricName": String,
"Category": String,
"Escalations": Map,
"Period": Integer,
"Webhook": String,
"Namespace": String,
"RuleName": String,
"Selector": String
}
]
AlertTemplates properties
Property | Type | Required | Editable | Description | Constraint |
MetricName | String | Yes | Yes | The name of the metric. | None. |
Category | String | Yes | Yes | The abbreviation of the service name. | Valid values:
|
Escalations | Map | No | No | The alert settings. | For more information, see Escalations properties. |
Period | Integer | No | Yes | The aggregation period of monitoring data. | The default value is the lowest frequency at which the metric is polled. Typically, you do not need to specify the aggregation period. Unit: seconds. |
Webhook | String | No | No | The webhook address to which a request is sent when an alert is triggered. | None. |
Namespace | String | Yes | Yes | The namespace of the service. | For more information, see DescribeMetricMetaList or Usage notes. |
RuleName | String | Yes | Yes | The name of the alert rule. | None. |
Selector | String | No | Yes | The extended field selectors. | None. |
Escalations syntax
"Escalations": {
"Critical": Map,
"Info": Map,
"Warn": Map
}
Escalations properties
Property | Type | Required | Editable | Description | Constraint |
Critical | Map | Yes | Yes | The settings for critical-level alerts. | For more information, see Critical properties. |
Info | Map | No | Yes | The settings for info-level alerts. | For more information, see Info properties. |
Warn | Map | No | Yes | The settings for warn-level alerts. | For more information, see Warn properties. |
Critical syntax
"Critical": {
"ComparisonOperator": String,
"Times": Integer,
"Statistics": String,
"Threshold": String
}
Critical properties
Property | Type | Required | Editable | Description | Constraint |
ComparisonOperator | String | Yes | Yes | The comparison operator of the threshold for critical-level alerts. | Valid values:
|
Times | Integer | Yes | Yes | The number of times for which the metric value must exceed the threshold consecutively before a critical-level alert is triggered. | None. |
Statistics | String | Yes | Yes | The statistical method for critical-level alerts. | None. |
Threshold | String | Yes | Yes | The threshold for critical-level alerts. | None. |
Info syntax
"Info": {
"ComparisonOperator": String,
"Times": Integer,
"Statistics": String,
"Threshold": String
}
Info properties
Property | Type | Required | Editable | Description | Constraint |
ComparisonOperator | String | Yes | Yes | The comparison operator of the threshold for info-level alerts. | Valid values:
|
Times | Integer | Yes | Yes | The number of times for which the metric value must exceed the threshold consecutively before an info-level alert is triggered. | None. |
Statistics | String | Yes | Yes | The statistical method for info-level alerts. | None. |
Threshold | String | Yes | Yes | The threshold for info-level alerts. | None. |
Warn syntax
"Warn": {
"ComparisonOperator": String,
"Times": Integer,
"Statistics": String,
"Threshold": String
}
Warn properties
Property | Type | Required | Editable | Description | Constraint |
ComparisonOperator | String | Yes | Yes | The comparison operator of the threshold for warn-level alerts. | Valid values:
|
Times | Integer | Yes | Yes | The number of times for which the metric value must exceed the threshold consecutively before a warn-level alert is triggered. | None. |
Statistics | String | Yes | Yes | The statistical method for warn-level alerts. | None. |
Threshold | String | Yes | Yes | The threshold for warn-level alerts. | None. |
Return values
Fn::GetAtt
Id: the ID of the alert template.