-
Notifications
You must be signed in to change notification settings - Fork 0
/
notification.cue
279 lines (261 loc) · 4.9 KB
/
notification.cue
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
package resources
resources: "Notification": {
plural: "notifications"
title: {
zh: "通知"
en: "Notification"
}
description: {
zh: """
通知是一种能够在事件发生时接收告警的功能。
观测云支持设置告警事件的通知对象,当告警事件发生时,会将告警信息发送到通知对象中。
观测云支持多种不同的通知方式,您可以参阅文档了解更多。
关联:
```mermaid
graph LR
A[监控器] --> B[告警策略] --> C[通知对象]
```
"""
en: """
Notification is a feature that allows you to receive alerts when an event occurs.
Guance Cloud supports setting the notification object for the alert event. When the alert event occurs, the alert information will be sent to the notification object.
Guance Cloud supports multiple different notification methods. You can refer to the documentation to learn more.
Relationships:
```mermaid
graph LR
A[Monitor] --> B[Alert Policy] --> C[Notification]
```
"""
}
identifier: {
primary: [
"/properties/name",
]
}
}
resources: "Notification": models: "Notification": {
properties: [
{
name: "name"
title: {
zh: "通知对象名字"
en: "Notification object name"
}
schema: {
type: "string"
len: {
min: 1
max: 64
}
required: true
}
},
{
name: "type"
title: {
zh: "触发规则类型"
en: "Trigger rule type"
}
schema: {
type: "string"
required: true
enum: [
{name: "ding_talk_robot", value: "ding_talk_robot", title: {zh: "钉钉机器人", en: "DingTalk Robot"}},
{name: "http_request", value: "http_request", title: {zh: "HTTP请求", en: "HTTP Request"}},
{name: "wechat_robot", value: "wechat_robot", title: {zh: "微信机器人", en: "WeChat Robot"}},
{name: "mail_group", value: "mail_group", title: {zh: "邮件组", en: "Mail Group"}},
{name: "feishu_robot", value: "feishu_robot", title: {zh: "飞书机器人", en: "Feishu Robot"}},
{name: "sms", value: "sms", title: {zh: "短信", en: "SMS"}},
]
}
},
{
name: "ding_talk_robot"
title: {
zh: "钉钉机器人"
en: "DingTalk Robot"
}
schema: {
type: "object"
model: "DingTalkRobot"
}
},
{
name: "http_request"
title: {
zh: "HTTP请求"
en: "HTTP Request"
}
schema: {
type: "object"
model: "HTTPRequest"
}
},
{
name: "wechat_robot"
title: {
zh: "微信机器人"
en: "WeChat Robot"
}
schema: {
type: "object"
model: "WeChatRobot"
}
},
{
name: "mail_group"
title: {
zh: "邮件组"
en: "Mail Group"
}
schema: {
type: "object"
model: "MailGroup"
}
},
{
name: "feishu_robot"
title: {
zh: "飞书机器人"
en: "Feishu Robot"
}
schema: {
type: "object"
model: "FeishuRobot"
}
},
{
name: "sms"
title: {
zh: "短信"
en: "SMS"
}
schema: {
type: "object"
model: "SMS"
}
},
]
}
resources: "Notification": models: "DingTalkRobot": {
properties: [
{
name: "webhook"
title: {
zh: "钉钉机器⼈调⽤地址"
en: "DingTalk Robot Call Address"
}
schema: {
type: "string"
required: true
}
},
{
name: "secret"
title: {
zh: "钉钉机器⼈调⽤密钥"
en: "DingTalk Robot Call Secret"
}
schema: {
type: "string"
len: {
min: 1
max: 64
}
required: true
}
},
]
}
resources: "Notification": models: "HTTPRequest": {
properties: [
{
name: "url"
title: {
zh: "HTTP 调⽤地址"
en: "HTTP Call Address"
}
schema: {
type: "string"
required: true
}
},
]
}
resources: "Notification": models: "WeChatRobot": {
properties: [
{
name: "webhook"
title: {
zh: "机器⼈调⽤地址"
en: "Robot Call Address"
}
schema: {
type: "string"
required: true
}
},
]
}
resources: "Notification": models: "MailGroup": {
properties: [
{
name: "to"
title: {
zh: "成员账号列表"
en: "Member Account List"
}
schema: {
type: "array"
elem: {
type: "string"
}
required: true
}
},
]
}
resources: "Notification": models: "FeishuRobot": {
properties: [
{
name: "webhook"
title: {
zh: "飞书机器⼈调⽤地址"
en: "Feishu Robot Call Address"
}
schema: {
type: "string"
required: true
}
},
{
name: "secret"
title: {
zh: "飞书机器⼈调⽤密钥"
en: "Feishu Robot Call Secret"
}
schema: {
type: "string"
required: true
}
},
]
}
resources: "Notification": models: "SMS": {
properties: [
{
name: "to"
title: {
zh: "手机号码列表"
en: "Phone Number List"
}
schema: {
type: "array"
elem: {
type: "string"
}
required: true
}
},
]
}