-
Notifications
You must be signed in to change notification settings - Fork 35
/
group-metric-rule.yml
184 lines (184 loc) · 5.03 KB
/
group-metric-rule.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建CMS监控规则、目标与消息主题,支持多维度指标警报配置与通知策略。
en: Create CMS monitoring rules, targets, and message topics, supporting multi-dimensional
metric alert configurations and notification policies.
Parameters:
TopicName:
Type: String
Description: Topic name
MinLength: 1
MaxLength: 256
RuleName:
Type: String
Description: The name of the alert rule.
Category:
Type: String
Description: |-
The abbreviation of the service name. Valid values:
ECS (including Alibaba Cloud and non-Alibaba Cloud hosts)
RDS (ApsaraDB for RDS)
ADS (AnalyticDB)
SLB (Server Load Balancer)
VPC (Virtual Private Cloud)
APIGATEWAY (API Gateway)
CDN
CS (Container Service for Swarm)
DCDN (Dynamic Route for CDN)
DDoS (distributed denial of service)
EIP (Elastic IP)
ELASTICSEARCH (Elasticsearch)
EMR (E-MapReduce)
ESS (Auto Scaling)
HBASE (ApsaraDB for HBase)
IOT_EDGE (IoT Edge)
K8S_POD (k8s pod)
KVSTORE_SHARDING (ApsaraDB for Redis cluster version)
KVSTORE_SPLITRW (ApsaraDB for Redis read/write splitting version)
KVSTORE_STANDARD (ApsaraDB for Redis standard version)
MEMCACHE (ApsaraDB for Memcache)
MNS (Message Service)
MONGODB (ApsaraDB for MongoDB replica set instances)
MONGODB_CLUSTER (ApsaraDB for MongoDB cluster version)
MONGODB_SHARDING (ApsaraDB for MongoDB sharded clusters)
MQ_TOPIC (Message Service topic)
OCS (original version of ApsaraDB for Memcache)
OPENSEARCH (Open Search)
OSS (Object Storage Service)
POLARDB (ApsaraDB for POLARDB)
PETADATA (HybridDB for MySQL)
SCDN (Secure Content Delivery Network)
SHAREBANDWIDTHPACKAGES (shared bandwidth package)
SLS (Log Service)
VPN (VPN Gateway)
RuleId:
Type: String
Description: |-
The ID of the alert rule. The IDs of alert rules are generated by callers to ensure
uniqueness.
Default: mytest
Namespace:
Type: String
Description: |-
The data namespace of the service. For more information, call DescribeMetricMetaList
or see Preset metrics reference.
GroupId:
Type: String
Description: The ID of application group.
MetricName:
Type: String
Description: The name of the metric. For more information, call DescribeMetricMetaList
or see Preset metrics reference.
Escalations:
Type: Json
NoEffectiveInterval:
Type: String
Description: The period when the alert rule is ineffective.
Default: null
SilenceTime:
Type: Number
Description: |-
The duration of the mute period during which new alerts are not sent even if the trigger
conditions are met. Unit: second. Default value: 86400. Minimum value: 60.
Default: null
MinValue: 60
Dimensions:
Type: String
Description: The expended resource dimensions.
Default: null
Period:
Type: Number
Description: 'The aggregation period. Unite: second.'
Default: null
EffectiveInterval:
Type: String
Description: The period when the alert rule is effective.
Default: null
EmailSubject:
Type: String
Description: The subject of the alert notification email.
Default: null
Webhook:
Type: String
Description: The URL of the callback triggered when an alert occurs.
Default: null
Interval:
Type: Number
Description: The detection period of alerts.
Default: null
Resources:
GroupMetricRule:
Type: ALIYUN::CMS::GroupMetricRule
Properties:
NoEffectiveInterval:
Ref: NoEffectiveInterval
SilenceTime:
Ref: SilenceTime
Category:
Ref: Category
RuleId:
Ref: RuleId
Dimensions:
Ref: Dimensions
Period:
Ref: Period
EffectiveInterval:
Ref: EffectiveInterval
Namespace:
Ref: Namespace
GroupId:
Ref: GroupId
MetricName:
Ref: MetricName
Escalations:
Ref: Escalations
EmailSubject:
Ref: EmailSubject
Webhook:
Ref: Webhook
RuleName:
Ref: RuleName
Interval:
Ref: Interval
Topic:
Type: ALIYUN::MNS::Topic
Properties:
TopicName:
Ref: TopicName
MetricRuleTargets:
Type: ALIYUN::CMS::MetricRuleTargets
Properties:
RuleId:
Ref: GroupMetricRule
Targets:
- Level: WARN
Id: '1'
Arn:
Fn::Sub:
- ${TopicArn}/message
- TopicArn:
Fn::GetAtt:
- Topic
- ARN.WithSlash
DependsOn:
- GroupMetricRule
- Topic
Outputs:
RuleId:
Description: Rule ID.
Value:
Fn::GetAtt:
- GroupMetricRule
- RuleId
Arns:
Description: The ARN list of targets
Value:
Fn::GetAtt:
- MetricRuleTargets
- Arns
Ids:
Description: The ID list of targets
Value:
Fn::GetAtt:
- MetricRuleTargets
- Ids