flashduty-knowledge-base 1.2.4 → 1.2.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/en.d.ts +1 -0
- package/dist/esm/en.js +665 -188
- package/dist/esm/zh.js +385 -96
- package/dist/iife/en.js +650 -173
- package/dist/iife/zh.js +371 -82
- package/dist/zh.d.ts +1 -0
- package/package.json +1 -1
package/dist/esm/zh.js
CHANGED
|
@@ -3251,7 +3251,7 @@ Sentry 提供了两类告警机制:Issue Alerts 和 Metric Alerts。Issue Aler
|
|
|
3251
3251
|
|resolved|Ok|恢复|
|
|
3252
3252
|
|
|
3253
3253
|
</div>
|
|
3254
|
-
`,
|
|
3254
|
+
`,A=`---
|
|
3255
3255
|
title: "监控宝告警事件"
|
|
3256
3256
|
description: "通过 webhook 的方式同步监控宝告警事件到 Flashduty,实现告警事件自动化降噪处理"
|
|
3257
3257
|
date: "2024-08-20T10:00:00+08:00"
|
|
@@ -3346,7 +3346,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/jiankongbao-integration-guide"
|
|
|
3346
3346
|
|2|Info|提醒|
|
|
3347
3347
|
|
|
3348
3348
|
</div>
|
|
3349
|
-
`,
|
|
3349
|
+
`,C=`---
|
|
3350
3350
|
title: "AWS EventBridge 告警事件"
|
|
3351
3351
|
description: "通过 webhook 的方式同步 AWS EventBridge 告警事件到 Flashduty,实现告警事件自动化降噪处理"
|
|
3352
3352
|
date: "2024-08-20T10:00:00+08:00"
|
|
@@ -3565,7 +3565,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/dynatrace-integration-guide"
|
|
|
3565
3565
|
|CUSTOM_ALERT|Info|提醒|
|
|
3566
3566
|
|
|
3567
3567
|
</div>
|
|
3568
|
-
`,
|
|
3568
|
+
`,I=`---
|
|
3569
3569
|
title: "华为云日志服务 LTS 告警事件"
|
|
3570
3570
|
description: "通过 webhook 的方式同步华为云日志服务 LTS 告警事件到 Flashduty,实现告警事件自动化降噪处理。"
|
|
3571
3571
|
date: "2024-08-20T10:00:00+08:00"
|
|
@@ -3681,7 +3681,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/huaweilts-integration-guide"
|
|
|
3681
3681
|
|Info|Info|提醒|
|
|
3682
3682
|
|
|
3683
3683
|
</div>
|
|
3684
|
-
`,
|
|
3684
|
+
`,L=`---
|
|
3685
3685
|
title: "GoogleCloudMonitoring 告警事件"
|
|
3686
3686
|
description: "通过 webhook 的方式同步 GoogleCloudMonitoring 告警事件到 Flashduty,实现告警事件自动化降噪处理"
|
|
3687
3687
|
date: "2024-07-05T10:00:00+08:00"
|
|
@@ -4215,7 +4215,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/volcengine-metric-integration-gui
|
|
|
4215
4215
|
|通知|Info|提醒|
|
|
4216
4216
|
|
|
4217
4217
|
</div>
|
|
4218
|
-
|
|
4218
|
+
`,E=`---
|
|
4219
4219
|
title: "火山引擎云监控事件中心告警事件"
|
|
4220
4220
|
description: "通过 webhook 的方式同步火山引擎云监控事件中心告警事件到 Flashduty,实现告警事件自动化降噪处理"
|
|
4221
4221
|
date: "2024-07-05T10:00:00+08:00"
|
|
@@ -4304,7 +4304,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/volcengine-event-integration-guid
|
|
|
4304
4304
|
|通知|Info|提醒|
|
|
4305
4305
|
|
|
4306
4306
|
</div>
|
|
4307
|
-
|
|
4307
|
+
`,$=`---
|
|
4308
4308
|
title: "火山引擎日志服务 TLS 告警事件"
|
|
4309
4309
|
description: "通过 webhook 的方式同步火山引擎日志服务 TLS 告警事件到 Flashduty,实现告警事件自动化降噪处理"
|
|
4310
4310
|
date: "2024-07-05T10:00:00+08:00"
|
|
@@ -5252,14 +5252,34 @@ sidebarDepth: 3
|
|
|
5252
5252
|
- 确保账户已经完成关联,前往 飞书 > 工作台 > 搜索应用名称 > 打开应用,完成一次登录并关联(飞书< - >Flashduty)账号。如果已经登录过,尝试点击右上角菜单,切换账户,重新登录来绑定账号
|
|
5253
5253
|
- 确保已购买足够的 license,已使用 license 情况,可以在控制台 > 费用中心查看
|
|
5254
5254
|
|
|
5255
|
-
|
|
5255
|
+
3. **分派策略飞书群聊列表为空**?
|
|
5256
5256
|
|
|
5257
5257
|
- 前往 飞书,选择群聊会话,添加已创建的Flashduty机器人,如下图所示:
|
|
5258
5258
|
- 回到分派策略配置页面,刷新后重新选择群聊列表
|
|
5259
5259
|
|
|
5260
5260
|
<img alt="drawing" width="800" src="https://download.flashcat.cloud/feishu-self-app-invite-to-chat.jpeg" />
|
|
5261
5261
|
<img src="https://download.flashcat.cloud/feishu-self-app-notify-rule.png" alt="drawing" width="800"/>
|
|
5262
|
-
|
|
5262
|
+
|
|
5263
|
+
4. **飞书自建应用 API 限制:** [飞书文档说明](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/platform-updates-/custom-app-api-call-limit)
|
|
5264
|
+
|
|
5265
|
+
**调用量限制:**
|
|
5266
|
+
|
|
5267
|
+
| 飞书版本 | 调用总量/月 | 刷新时间 |
|
|
5268
|
+
| :----------: | :--: | :----: |
|
|
5269
|
+
|基础免费版|10,000 次|每个自然月的 1 号|
|
|
5270
|
+
|其他版本|不限制|-|
|
|
5271
|
+
|
|
5272
|
+
**频控限制:**
|
|
5273
|
+
|
|
5274
|
+
| 场景 | 限制 |
|
|
5275
|
+
| :----------: | :--: |
|
|
5276
|
+
|所有接口|每个应用最高频率 50 次/秒|
|
|
5277
|
+
|发消息接口|每个应用最高频率 1000 次/分钟|
|
|
5278
|
+
|群机器人 Webhook|最高频率 100 次/分钟|
|
|
5279
|
+
|给同一个用户或同一个群发消息|最高频率 5 次/秒|
|
|
5280
|
+
|
|
5281
|
+
**注意:** 超出限制后将无法正常推送消息,建议合理使用通知渠道
|
|
5282
|
+
`,J=`---
|
|
5263
5283
|
title: "钉钉集成"
|
|
5264
5284
|
description: "通过集成钉钉自建应用,实现在钉钉端内接收和响应告警的能力"
|
|
5265
5285
|
date: "2024-05-11T10:00:00+08:00"
|
|
@@ -5410,7 +5430,16 @@ url: "https://docs.flashcat.cloud/zh/flashduty/dingtalk-integration-guide"
|
|
|
5410
5430
|
|
|
5411
5431
|
<img src="https://download.flashcat.cloud/dingtalk-self-app-notify-rule.png" alt="drawing" width="800"/>
|
|
5412
5432
|
|
|
5413
|
-
|
|
5433
|
+
4. **钉钉自建应用 API 调用量:** [钉钉文档说明](https://open.dingtalk.com/document/orgapp/descriptions-about-adjusting-limit-and-frequency-of-api-calls?spm=ding_open_doc.document.0.0.6f6b21d9WtkxJI)
|
|
5434
|
+
|
|
5435
|
+
| 钉钉版本 | 调用总量/月 | QPS| 刷新时间 |
|
|
5436
|
+
| :----------: | :--: | :----: | :----:|
|
|
5437
|
+
|标准版|10,000 次|20|每月1日|
|
|
5438
|
+
|专业版|50万次|40| 每月1日 |
|
|
5439
|
+
|专属版|550万次|60| 每月1日 |
|
|
5440
|
+
|
|
5441
|
+
**注意:** 超出限制后将无法正常推送消息,建议合理使用通知渠道
|
|
5442
|
+
`,G=`---
|
|
5414
5443
|
title: "企业微信集成"
|
|
5415
5444
|
description: "通过集成企业微信第三方应用,实现在企业微信端内接收和响应告警的能力"
|
|
5416
5445
|
date: "2024-05-11T10:00:00+08:00"
|
|
@@ -5490,7 +5519,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/wecom-integration-guide"
|
|
|
5490
5519
|
7. **故障通知失败,提示\`未开通企微许可\`?**
|
|
5491
5520
|
|
|
5492
5521
|
- 联系 Flashduty 客服或专属支持,为您购买开通
|
|
5493
|
-
`,
|
|
5522
|
+
`,V=`---
|
|
5494
5523
|
title: "Slack 集成"
|
|
5495
5524
|
description: "通过集成Slack第三方应用,实现在Slack内接收和响应告警的能力"
|
|
5496
5525
|
date: "2024-05-11T10:00:00+08:00"
|
|
@@ -5544,7 +5573,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/slack-integration-guide"
|
|
|
5544
5573
|
|
|
5545
5574
|
8. **Slack App 内 Other questions,报错**
|
|
5546
5575
|
- 重新操作,遇到了还没被记录的问题
|
|
5547
|
-
- 重试后仍然报错,联系客服`,
|
|
5576
|
+
- 重试后仍然报错,联系客服`,K=`---
|
|
5548
5577
|
title: "Microsoft Teams集成"
|
|
5549
5578
|
description: "通过集成 Microsoft Teams 第三方应用,实现在 Microsoft Teams 内接收和响应告警的能力"
|
|
5550
5579
|
date: "2024-05-11T10:00:00+08:00"
|
|
@@ -5639,7 +5668,7 @@ Microsoft Teams 集成现处于 Beta 阶段,在关联前您需要先完成以
|
|
|
5639
5668
|
暂不支持
|
|
5640
5669
|
</details>
|
|
5641
5670
|
|
|
5642
|
-
`,
|
|
5671
|
+
`,Z=`配置告警 Webhook,当告警发生特定操作(如触发、关闭)时,系统通过 HTTP 回调您配置的地址。回调内容将包含告警最新关键信息,您可以与自研工具进行集成。
|
|
5643
5672
|
|
|
5644
5673
|
<span id="EventTypes"></span>
|
|
5645
5674
|
|
|
@@ -5830,6 +5859,7 @@ curl -X POST 'https://example.com/alert/webhook?a=a' \\
|
|
|
5830
5859
|
| i_rslv | 关闭故障(自动或手动关闭) |
|
|
5831
5860
|
| i_reopen | 重新打开故障 |
|
|
5832
5861
|
| i_merge | 手动合并故障 |
|
|
5862
|
+
| i_comm | 添加评论 |
|
|
5833
5863
|
| i_r_title | 更新故障标题 |
|
|
5834
5864
|
| i_r_desc | 更新故障描述 |
|
|
5835
5865
|
| i_r_impact | 更新故障影响 |
|
|
@@ -6014,7 +6044,7 @@ curl -X POST 'https://example.com/incident/webhook?a=a' \\
|
|
|
6014
6044
|
|
|
6015
6045
|
4. **推送来源可信 IP 白名单?**
|
|
6016
6046
|
- {ip_whitelist}
|
|
6017
|
-
- 未来可能会更新,请定期查验`,
|
|
6047
|
+
- 未来可能会更新,请定期查验`,Y=`配置故障 自定义操作,允许您在故障排查期间,快速调用外部接口,实现故障自愈、信息丰富等任何自定义操作。
|
|
6018
6048
|
|
|
6019
6049
|
## 一、创建操作
|
|
6020
6050
|
|
|
@@ -6273,7 +6303,92 @@ curl -X POST 'https://example.com/incident/action?a=a' \\
|
|
|
6273
6303
|
|
|
6274
6304
|
2. **推送来源可信 IP 白名单?**
|
|
6275
6305
|
- {ip_whitelist}
|
|
6276
|
-
- 未来可能会更新,请定期查验`,
|
|
6306
|
+
- 未来可能会更新,请定期查验`,Q=`---
|
|
6307
|
+
title: "Jira 同步"
|
|
6308
|
+
description: "通过 Jira 同步 Webhook,实现故障与 Jira Issue 的关联。"
|
|
6309
|
+
date: "2024-05-11T10:00:00+08:00"
|
|
6310
|
+
url: "https://docs.flashcat.cloud/zh/flashduty/jira-sync"
|
|
6311
|
+
---
|
|
6312
|
+
|
|
6313
|
+
通过 Jira 同步 Webhook,将 Flashduty 的故障与 Jira Issue 进行关联同步,实现 Flashduty 与 Jira 的联动。
|
|
6314
|
+
|
|
6315
|
+
## 前提说明
|
|
6316
|
+
- 该集成兼容 Jira Cloud 以及 Jira Server 和 Jira Data Center 的 7.x 和 8.x 版本。
|
|
6317
|
+
- 目前仅支持将故障相关信息或状态单向同步到 Jira 中,Jira 中的信息不会同步到 Flashduty 中。
|
|
6318
|
+
- 对于 Jira Cloud,请在授权配置的密码处填写 API Token;而对于Jira Server 或 Data Center,则使用您的 Jira 账户登录密码即可。
|
|
6319
|
+
|
|
6320
|
+
## 在 Jira Cloud 中获取 API Token (Jira Server 和 Data Center 请跳过)
|
|
6321
|
+
|
|
6322
|
+
- 登录 Jira Cloud 后,点击右上角头像,选择 **管理账户**。
|
|
6323
|
+
- 在 **管理账户** 页面中,选择 **安全性** 选项卡。
|
|
6324
|
+
- 在 **安全性** 页面中,点击 **创建并管理 API 令牌** 按钮。
|
|
6325
|
+
- 在 **创建并管理 API 令牌** 弹窗中,填写 API token 名称,并选择过期时间。
|
|
6326
|
+
- 点击 **创建** 按钮,创建 API token。
|
|
6327
|
+
- 创建完成后,复制 API token 值,并粘贴到 Flashduty 授权配置中的 API 令牌处。
|
|
6328
|
+
|
|
6329
|
+
## 在 Flashduty 中配置集成
|
|
6330
|
+
|
|
6331
|
+
### 1. 创建并认证 Jira 集成
|
|
6332
|
+
<div class="hide">
|
|
6333
|
+
|
|
6334
|
+
在集成中心,选择 **Webhook** ,选择 **Jira 同步** 集成,并填写以下认证信息。
|
|
6335
|
+
|
|
6336
|
+
</div>
|
|
6337
|
+
|
|
6338
|
+
- **Jira 平台类型**:根据您使用的版本进行选择,如果是 Data Center 版本的请选择私有化(Server) 即可。
|
|
6339
|
+
- **服务地址**:Cloud 版本请填写您的实际访问地址,例如: https://your-domain.atlassian.net,Server 版本请填写您的服务访问地址,例如: https://your-jira-server-url.com。
|
|
6340
|
+
- **用户名**:您的 Jira 账户名,Cloud 版本请填写您的邮箱,Server 版本请填写您的 Jira 账户名。
|
|
6341
|
+
- **API令牌/密码**:您的 Jira 账户密码,Cloud 版本请填写 API Token,Server 版本请填写您的 Jira 账户密码。
|
|
6342
|
+
- 填写完成后,点击 **下一步** 按钮,进行相关配置。
|
|
6343
|
+
|
|
6344
|
+
**关于权限**:请确保您的 Jira 账户拥有获取相关项目、事务类型以及创建 Issue 等权限,建议使用管理员账户。
|
|
6345
|
+
|
|
6346
|
+
### 2. Jira 集成配置
|
|
6347
|
+
|
|
6348
|
+
- **集成名称**:为当前集成定义一个名称。
|
|
6349
|
+
- **触发模式**:
|
|
6350
|
+
- 自动触发:需要配置相应的条件,Flashduty 会自动将符合条件的故障同步到 Jira 中。
|
|
6351
|
+
- 手动触发:需要在故障详情页的更多操作中手动触发 Jira 同步(该集成配置的名称为触发器名称)。
|
|
6352
|
+
- **项目 ID**:选择需要同步至 Jira 的项目。
|
|
6353
|
+
- **事务类型**:选择需要同步至 Jira 的事务类型。
|
|
6354
|
+
- **协作空间**:选择该集成生效的协作空间,只有该协作空间内的故障才可以同步至 Jira 中。
|
|
6355
|
+
- **严重程度映射**:如果选择的事务类型不支持优先级字段,则无法配置该映射关系。
|
|
6356
|
+
- **自定义字段映射**:可以选择将故障的某些标签或所有标签以及自定义字段内容同步至 Jira 的字段中(仅支持文本类型的字段)。
|
|
6357
|
+
|
|
6358
|
+
### 3. 关于更新
|
|
6359
|
+
|
|
6360
|
+
- 已经创建 Issue 的故障,如果您更新了故障的严重程度、状态,Jira 中会自动更新,但 Jira 中的更新不会同步到 Flashduty 中。
|
|
6361
|
+
- 评论信息会同步到 Jira 中,但 Jira 中更新的内容不会同步到 Flashduty 中。
|
|
6362
|
+
- 更新故障中的标题、描述、标签等字段的信息,Jira 中不会更新。
|
|
6363
|
+
|
|
6364
|
+
|
|
6365
|
+
### 4. Flashduty 与 Jira 的映射关系
|
|
6366
|
+
|
|
6367
|
+
#### 字段映射
|
|
6368
|
+
|
|
6369
|
+
| Jira | Flashduty |
|
|
6370
|
+
| ---------- | -------- |
|
|
6371
|
+
| 摘要 | 标题 |
|
|
6372
|
+
| 描述 | 描述 |
|
|
6373
|
+
| 优先级 | 严重程度 |
|
|
6374
|
+
| 报告人 | 集成配置的用户 |
|
|
6375
|
+
| 评论 | 评论 |
|
|
6376
|
+
|
|
6377
|
+
|
|
6378
|
+
#### 状态映射
|
|
6379
|
+
|
|
6380
|
+
| Jira | Flashduty |
|
|
6381
|
+
| ---------- | -------- |
|
|
6382
|
+
| Todo | 待处理 |
|
|
6383
|
+
| In Progress | 处理中 |
|
|
6384
|
+
| Done | 已解决 |
|
|
6385
|
+
|
|
6386
|
+
|
|
6387
|
+
### 5. 注意事项
|
|
6388
|
+
|
|
6389
|
+
- Flashduty 会按照默认的字段映射以及您配置的自定义字段映射进行同步信息,如果您的 Jira 事务类型中有必选的字段且没有配置映射关系,则会遇到创建 Jira Issue 失败的情况。
|
|
6390
|
+
- Jira 的 Issue 详情是基于项目 KEY + 编号的格式进行访问的,如果您修改了项目 KEY,可能无法通过 Flashduty 中保存的 Issue 地址进行访问,请谨慎修改项目 KEY。
|
|
6391
|
+
`,nn=`---
|
|
6277
6392
|
title: "配置通知模版"
|
|
6278
6393
|
description: "通过自定义配置模版,可以实现个性化通知内容的需求"
|
|
6279
6394
|
date: "2024-05-10T10:00:00+08:00"
|
|
@@ -6306,7 +6421,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/template-settings"
|
|
|
6306
6421
|
---
|
|
6307
6422
|
**引用变量示例**:
|
|
6308
6423
|
|
|
6309
|
-
\`\`\`
|
|
6424
|
+
\`\`\`go
|
|
6310
6425
|
// 引用标题
|
|
6311
6426
|
{{.Title}}
|
|
6312
6427
|
|
|
@@ -6410,7 +6525,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6410
6525
|
- 渲染失败后,系统将使用默认模板兜底,来保证消息可达;
|
|
6411
6526
|
- 推荐您在不确定引用变量是否存在时,使用逻辑判断来避免渲染异常,如\`resource\`标签:
|
|
6412
6527
|
|
|
6413
|
-
\`\`\`
|
|
6528
|
+
\`\`\`go
|
|
6414
6529
|
// 错误做法:直接读取标签
|
|
6415
6530
|
{{.Labels.resource}}
|
|
6416
6531
|
|
|
@@ -6420,7 +6535,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6420
6535
|
|
|
6421
6536
|
3. **故障标题含有“>”之类的\`字符转义\`?**
|
|
6422
6537
|
|
|
6423
|
-
\`\`\`
|
|
6538
|
+
\`\`\`go
|
|
6424
6539
|
// 使用toHtml函数
|
|
6425
6540
|
{{toHtml .Title}}
|
|
6426
6541
|
|
|
@@ -6430,7 +6545,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6430
6545
|
|
|
6431
6546
|
4. **时间变量都是时间戳类型,如何\`转换时间格式\`?**
|
|
6432
6547
|
|
|
6433
|
-
\`\`\`
|
|
6548
|
+
\`\`\`go
|
|
6434
6549
|
// date函数,将时间戳转换可读格式
|
|
6435
6550
|
// "2006-01-02 15:04:05"是一种常见格式,更多格式请检索网络
|
|
6436
6551
|
{{date "2006-01-02 15:04:05" .StartTime}}
|
|
@@ -6440,7 +6555,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6440
6555
|
\`\`\`
|
|
6441
6556
|
|
|
6442
6557
|
5. **如何在 for 循环内部引用外部变量?**
|
|
6443
|
-
\`\`\`
|
|
6558
|
+
\`\`\`go
|
|
6444
6559
|
// 在外部变量前增加”$“
|
|
6445
6560
|
{{range .Responders}}
|
|
6446
6561
|
{{if eq $.Progress "Triggered"}}
|
|
@@ -6450,14 +6565,14 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6450
6565
|
\`\`\`
|
|
6451
6566
|
6. **如何提取命名中带”.“的字段值,如标签中的“obj.instance”的信息?**
|
|
6452
6567
|
|
|
6453
|
-
\`\`\`
|
|
6568
|
+
\`\`\`go
|
|
6454
6569
|
// 使用index函数
|
|
6455
6570
|
{{index .Labels "obj.instance"}}
|
|
6456
6571
|
\`\`\`
|
|
6457
6572
|
|
|
6458
6573
|
7. **如何提取故障关联告警中某个label的信息并去重?**
|
|
6459
6574
|
|
|
6460
|
-
\`\`\`
|
|
6575
|
+
\`\`\`go
|
|
6461
6576
|
// 使用alertLabels函数,得到去重后的数组
|
|
6462
6577
|
{{alertLabels . "resource"}}
|
|
6463
6578
|
|
|
@@ -6467,7 +6582,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6467
6582
|
|
|
6468
6583
|
8. **如何遍历并打印labels?**
|
|
6469
6584
|
|
|
6470
|
-
\`\`\`
|
|
6585
|
+
\`\`\`go
|
|
6471
6586
|
// 完整遍历
|
|
6472
6587
|
{{range $k, $v := .Labels}}
|
|
6473
6588
|
{{$k}} : {{toHtml $v}}
|
|
@@ -6514,11 +6629,13 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6514
6629
|
以下为各通知渠道具体说明。
|
|
6515
6630
|
|
|
6516
6631
|
|
|
6632
|
+
<div class="feishu_app hide">
|
|
6633
|
+
|
|
6517
6634
|
## 飞书应用
|
|
6518
6635
|
---
|
|
6519
6636
|
您需要预先配置 \`集成中心-即时消息-飞书\` 集成,才能发送消息卡片。如果不设置自定义内容,将采用系统默认模板,渲染全部标签信息:
|
|
6520
6637
|
|
|
6521
|
-
\`\`\`
|
|
6638
|
+
\`\`\`go
|
|
6522
6639
|
{{if .Description}}**description** :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6523
6640
|
{{if .Labels.resource}}**resource** : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6524
6641
|
{{range $k, $v := .Labels}}
|
|
@@ -6534,7 +6651,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6534
6651
|
- 我们列出了一些常见标签,您可自行删减;
|
|
6535
6652
|
- 在飞书应用中,系统会自动帮您删除(因标签不存在导致的)渲染空行,您可放心配置
|
|
6536
6653
|
|
|
6537
|
-
\`\`\`
|
|
6654
|
+
\`\`\`go
|
|
6538
6655
|
{{if (index .Labels "resource")}}resource:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6539
6656
|
{{if (index .Labels "check")}}check:{{toHtml (index .Labels "check")}}{{end}}
|
|
6540
6657
|
{{if (index .Labels "metric")}}metric:{{index .Labels "metric"}}{{end}}
|
|
@@ -6556,14 +6673,15 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6556
6673
|
{{if (index .Labels "mode")}}mode:{{index .Labels "mode"}}{{end}}
|
|
6557
6674
|
{{if (index .Labels "runbook_url")}}runbook_url:{{toHtml (index .Labels "runbook_url")}}{{end}}
|
|
6558
6675
|
\`\`\`
|
|
6676
|
+
</div>
|
|
6559
6677
|
|
|
6560
|
-
|
|
6678
|
+
<div class="dingtalk_app hide">
|
|
6561
6679
|
|
|
6562
6680
|
## 钉钉应用
|
|
6563
6681
|
---
|
|
6564
6682
|
您需要预先配置 \`集成中心-即时消息-钉钉\` 集成,才能发送消息卡片。如果不设置自定义内容,将采用系统默认模板,渲染全部标签信息:
|
|
6565
6683
|
|
|
6566
|
-
\`\`\`
|
|
6684
|
+
\`\`\`go
|
|
6567
6685
|
{{if .Description}}**description** :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6568
6686
|
{{if .Labels.resource}}**resource** : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6569
6687
|
{{range $k, $v := .Labels}}
|
|
@@ -6579,7 +6697,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6579
6697
|
- 我们列出了一些常见标签,您可自行删减;
|
|
6580
6698
|
- 在钉钉应用中,系统会自动帮您删除(因标签不存在导致的)渲染空行,您可放心配置
|
|
6581
6699
|
|
|
6582
|
-
\`\`\`
|
|
6700
|
+
\`\`\`go
|
|
6583
6701
|
{{if (index .Labels "resource")}}**resource**:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6584
6702
|
{{if (index .Labels "metric")}}**metric**:{{index .Labels "metric"}}{{end}}
|
|
6585
6703
|
{{if (index .Labels "prom_ql")}}**prom_ql**:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
@@ -6600,7 +6718,9 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6600
6718
|
{{if (index .Labels "mode")}}**mode**:{{index .Labels "mode"}}{{end}}
|
|
6601
6719
|
{{if (index .Labels "runbook_url")}}**runbook_url**:{{index .Labels "runbook_url"}}{{end}}
|
|
6602
6720
|
\`\`\`
|
|
6721
|
+
</div>
|
|
6603
6722
|
|
|
6723
|
+
<div class="wecom_app hide">
|
|
6604
6724
|
|
|
6605
6725
|
## 企业微信应用
|
|
6606
6726
|
---
|
|
@@ -6610,7 +6730,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6610
6730
|
- 我们列出了一些常见标签,您可自行删减;
|
|
6611
6731
|
- 在企业微信应用中,系统会自动帮您删除(因标签不存在导致的)渲染空行,您可放心配置
|
|
6612
6732
|
|
|
6613
|
-
\`\`\`
|
|
6733
|
+
\`\`\`go
|
|
6614
6734
|
{{if (index .Labels "resource")}}resource:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6615
6735
|
{{if (index .Labels "metric")}}metric:{{index .Labels "metric"}}{{end}}
|
|
6616
6736
|
{{if (index .Labels "prom_ql")}}prom_ql:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
@@ -6638,13 +6758,15 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6638
6758
|
|
|
6639
6759
|
**注意,企业微信限制了卡片长度,在模板渲染区域,您最多可以渲染不超过 8 行内容,超过 8 行的部分将被隐藏**
|
|
6640
6760
|
|
|
6761
|
+
</div>
|
|
6641
6762
|
|
|
6763
|
+
<div class="slack_app hide">
|
|
6642
6764
|
|
|
6643
6765
|
## Slack 应用
|
|
6644
6766
|
---
|
|
6645
6767
|
您需要预先配置 \`集成中心-即时消息- Slack\` 集成,才能发送消息卡片。如果不设置自定义内容,将采用系统默认模板,仅渲染常见标签信息:
|
|
6646
6768
|
|
|
6647
|
-
\`\`\`
|
|
6769
|
+
\`\`\`go
|
|
6648
6770
|
{{if .Description}}*description* :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6649
6771
|
{{if .Labels.resource}}*resource* : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6650
6772
|
{{range $k, $v := .Labels}}
|
|
@@ -6662,7 +6784,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6662
6784
|
- 消息可以发送长度为15000左右字符,超出后截断发送;
|
|
6663
6785
|
- 在 Slack 应用中,系统会自动帮您删除(因标签不存在导致的)渲染空行,您可放心配置
|
|
6664
6786
|
|
|
6665
|
-
\`\`\`
|
|
6787
|
+
\`\`\`go
|
|
6666
6788
|
{{if (index .Labels "resource")}}*resource*:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6667
6789
|
{{if (index .Labels "metric")}}*metric*:{{index .Labels "metric"}}{{end}}
|
|
6668
6790
|
{{if (index .Labels "prom_ql")}}*prom_ql*:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
@@ -6683,62 +6805,15 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6683
6805
|
{{if (index .Labels "mode")}}*mode*:{{index .Labels "mode"}}{{end}}
|
|
6684
6806
|
{{if (index .Labels "runbook_url")}}*runbook_url*:{{index .Labels "runbook_url"}}{{end}}
|
|
6685
6807
|
\`\`\`
|
|
6808
|
+
</div>
|
|
6686
6809
|
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
## Microsoft Teams 应用
|
|
6690
|
-
---
|
|
6691
|
-
您需要预先配置 \`集成中心-即时消息- Microsoft Teams\` 集成,才能发送消息卡片。如果不设置自定义内容,将采用系统默认模板,仅渲染常见标签信息:
|
|
6692
|
-
|
|
6693
|
-
\`\`\`
|
|
6694
|
-
{{if .Description}}**description** :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6695
|
-
{{if .Labels.resource}}**resource** : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6696
|
-
{{range $k, $v := .Labels}}
|
|
6697
|
-
{{if not (in $k "resource" "body_text" "body_text_with_table")}}**{{$k}}** : {{toHtml $v}}{{end}}{{end}}
|
|
6698
|
-
\`\`\`
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
如下图所示:
|
|
6702
|
-
|
|
6703
|
-
<img src="https://download.flashcat.cloud/flashduty/integration/microsoft-teams/teams_app_message.png" alt="drawing" style="display: block; margin: 0 auto;" width="300"/>
|
|
6704
|
-
|
|
6705
|
-
如果您期望仅展示关键标签信息,可以参照下边的代码段:
|
|
6706
|
-
|
|
6707
|
-
- 我们列出了一些常见标签,您可自行删减;
|
|
6708
|
-
- 消息可以发送长度为 28KB 左右字节,超出后报错;
|
|
6709
|
-
- 在 Microsoft Teams 应用中,系统会自动帮您删除(因标签不存在导致的)渲染空行,您可放心配置
|
|
6710
|
-
|
|
6711
|
-
\`\`\`
|
|
6712
|
-
{{if (index .Labels "resource")}}**resource**:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6713
|
-
{{if (index .Labels "metric")}}**metric**:{{index .Labels "metric"}}{{end}}
|
|
6714
|
-
{{if (index .Labels "prom_ql")}}**prom_ql**:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
6715
|
-
{{if (index .Labels "trigger_value")}}**trigger_value**:{{index .Labels "trigger_value"}}{{end}}
|
|
6716
|
-
{{if (index .Labels "host_ql")}}**host_ql**:{{index .Labels "host_ql"}}{{end}}
|
|
6717
|
-
{{if (index .Labels "region")}}**region**:{{index .Labels "region"}}{{end}}
|
|
6718
|
-
{{if (index .Labels "cluster")}}**cluster**:{{index .Labels "cluster"}}{{end}}
|
|
6719
|
-
{{if (index .Labels "business")}}**business**:{{index .Labels "business"}}{{end}}
|
|
6720
|
-
{{if (index .Labels "service")}}**service**:{{index .Labels "service"}}{{end}}
|
|
6721
|
-
{{if (index .Labels "env")}}**env**:{{index .Labels "env"}}{{end}}
|
|
6722
|
-
{{if (index .Labels "type")}}**type**:{{index .Labels "type"}}{{end}}
|
|
6723
|
-
{{if (index .Labels "topic")}}**topic**:{{index .Labels "topic"}}{{end}}
|
|
6724
|
-
{{if (index .Labels "cpu")}}**cpu**:{{index .Labels "cpu"}}{{end}}
|
|
6725
|
-
{{if (index .Labels "device")}}**device**:{{index .Labels "device"}}{{end}}
|
|
6726
|
-
{{if (index .Labels "path")}}**path**:{{index .Labels "path"}}{{end}}
|
|
6727
|
-
{{if (index .Labels "fstype")}}**fstype**:{{index .Labels "fstype"}}{{end}}
|
|
6728
|
-
{{if (index .Labels "name")}}**name**:{{index .Labels "name"}}{{end}}
|
|
6729
|
-
{{if (index .Labels "mode")}}**mode**:{{index .Labels "mode"}}{{end}}
|
|
6730
|
-
{{if (index .Labels "runbook_url")}}**runbook_url**:{{index .Labels "runbook_url"}}{{end}}
|
|
6731
|
-
\`\`\`
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6810
|
+
<div class="teams_app hide">
|
|
6736
6811
|
|
|
6737
6812
|
## Microsoft Teams 应用
|
|
6738
6813
|
---
|
|
6739
6814
|
您需要预先配置 \`集成中心-即时消息- Microsoft Teams\` 集成,才能发送消息卡片。如果不设置自定义内容,将采用系统默认模板,仅渲染常见标签信息:
|
|
6740
6815
|
|
|
6741
|
-
\`\`\`
|
|
6816
|
+
\`\`\`go
|
|
6742
6817
|
{{if .Description}}**description** :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6743
6818
|
{{if .Labels.resource}}**resource** : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6744
6819
|
{{range $k, $v := .Labels}}
|
|
@@ -6756,7 +6831,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6756
6831
|
- 消息可以发送长度为 28KB 左右字节,超出后报错;
|
|
6757
6832
|
- 在 Microsoft Teams 应用中,系统会自动帮您删除(因标签不存在导致的)渲染空行,您可放心配置
|
|
6758
6833
|
|
|
6759
|
-
\`\`\`
|
|
6834
|
+
\`\`\`go
|
|
6760
6835
|
{{if (index .Labels "resource")}}**resource**:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6761
6836
|
{{if (index .Labels "metric")}}**metric**:{{index .Labels "metric"}}{{end}}
|
|
6762
6837
|
{{if (index .Labels "prom_ql")}}**prom_ql**:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
@@ -6777,18 +6852,220 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6777
6852
|
{{if (index .Labels "mode")}}**mode**:{{index .Labels "mode"}}{{end}}
|
|
6778
6853
|
{{if (index .Labels "runbook_url")}}**runbook_url**:{{index .Labels "runbook_url"}}{{end}}
|
|
6779
6854
|
\`\`\`
|
|
6855
|
+
</div>
|
|
6780
6856
|
|
|
6781
|
-
|
|
6857
|
+
<div class="feishu hide">
|
|
6782
6858
|
|
|
6783
6859
|
## 飞书机器人
|
|
6784
6860
|
---
|
|
6785
|
-
|
|
6861
|
+
飞书机器人支持消息卡片,富文本和普通文本三种格式,默认模版是消息卡片格式。
|
|
6786
6862
|
|
|
6863
|
+
- msg_type 字段在消息卡片和富文本中必填,否则当成普通文本格式发送
|
|
6787
6864
|
- 消息\`最大长度为4000字节,超出后截断发送\`;
|
|
6788
|
-
- 如果文本中包含\`<br>\`,渲染时会\`先删除空行,再将<br>替换为换行符\`;
|
|
6789
6865
|
- 如果不设置自定义内容,将采用系统默认模板,仅展示关键信息:
|
|
6790
6866
|
|
|
6867
|
+
1. 消息卡片
|
|
6868
|
+
msg_type 必填,值为 interactive
|
|
6869
|
+
\`\`\`json
|
|
6870
|
+
{
|
|
6871
|
+
"msg_type": "interactive",
|
|
6872
|
+
"card": {
|
|
6873
|
+
"config": {
|
|
6874
|
+
"wide_screen_mode": true,
|
|
6875
|
+
"enable_forward": true
|
|
6876
|
+
},
|
|
6877
|
+
"header": {
|
|
6878
|
+
"template": "{{if eq .IncidentSeverity "Critical"}}red{{else if eq .IncidentSeverity "Warning"}}orange{{else}}yellow{{end}}",
|
|
6879
|
+
"title": {
|
|
6880
|
+
"content": "{{fireReason .}}INC #{{.Num}} {{toHtml .Title}}",
|
|
6881
|
+
"tag": "plain_text"
|
|
6882
|
+
}
|
|
6883
|
+
},
|
|
6884
|
+
"elements": [{
|
|
6885
|
+
"tag": "div",
|
|
6886
|
+
"fields": [{
|
|
6887
|
+
"text": {
|
|
6888
|
+
"tag": "lark_md",
|
|
6889
|
+
"content": "**🏢 协作空间:**{{if .ChannelName}}{{.ChannelName}}{{else}}无{{end}}"
|
|
6890
|
+
}
|
|
6891
|
+
},
|
|
6892
|
+
{
|
|
6893
|
+
"text": {
|
|
6894
|
+
"tag": "lark_md",
|
|
6895
|
+
"content": "**{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}⚠️{{else}}ℹ️{{end}} 严重程度:**{{.IncidentSeverity}}"
|
|
6896
|
+
}
|
|
6897
|
+
},
|
|
6898
|
+
{
|
|
6899
|
+
"text": {
|
|
6900
|
+
"tag": "lark_md",
|
|
6901
|
+
"content": "**⏰ 触发时间:**{{date "2006-01-02 15:04:05" .StartTime}}{{if gt .AlertCnt 1}}"
|
|
6902
|
+
}
|
|
6903
|
+
},
|
|
6904
|
+
{
|
|
6905
|
+
"text": {
|
|
6906
|
+
"tag": "lark_md",
|
|
6907
|
+
"content": "**🔔 聚合告警:**{{.AlertCnt}}条 {{end}}{{if .Labels.resource}}"
|
|
6908
|
+
}
|
|
6909
|
+
},
|
|
6910
|
+
{
|
|
6911
|
+
"tag": "div",
|
|
6912
|
+
"text": {
|
|
6913
|
+
"tag": "lark_md",
|
|
6914
|
+
"content": "**📌 告警对象:**{{toHtml (joinAlertLabels . "resource" ",")}} {{end}}{{if .Description}}"
|
|
6915
|
+
}
|
|
6916
|
+
},
|
|
6917
|
+
{
|
|
6918
|
+
"tag": "div",
|
|
6919
|
+
"text": {
|
|
6920
|
+
"tag": "lark_md",
|
|
6921
|
+
"content": "**🔍 故障描述:**{{.Description}}{{end}}{{if gt (len .Responders) 0}}"
|
|
6922
|
+
}
|
|
6923
|
+
},
|
|
6924
|
+
{
|
|
6925
|
+
"tag": "div",
|
|
6926
|
+
"text": {
|
|
6927
|
+
"tag": "lark_md",
|
|
6928
|
+
"content": "**👨💻 处理人员:**{{range .Responders}}@{{.PersonName}} {{end}}{{end}}"
|
|
6929
|
+
}
|
|
6930
|
+
}
|
|
6931
|
+
]
|
|
6932
|
+
},
|
|
6933
|
+
{
|
|
6934
|
+
"tag": "hr"
|
|
6935
|
+
},
|
|
6936
|
+
{
|
|
6937
|
+
"tag": "action",
|
|
6938
|
+
"actions": [{
|
|
6939
|
+
"tag": "button",
|
|
6940
|
+
"text": {
|
|
6941
|
+
"tag": "plain_text",
|
|
6942
|
+
"content": "故障详情"
|
|
6943
|
+
},
|
|
6944
|
+
"type": "primary",
|
|
6945
|
+
"url": "{{.DetailUrl}}"
|
|
6946
|
+
},
|
|
6947
|
+
{
|
|
6948
|
+
"tag": "button",
|
|
6949
|
+
"text": {
|
|
6950
|
+
"tag": "plain_text",
|
|
6951
|
+
"content": "认领"
|
|
6952
|
+
},
|
|
6953
|
+
"type": "primary",
|
|
6954
|
+
"url": "{{.DetailUrl}}?ack=1"
|
|
6955
|
+
}
|
|
6956
|
+
]
|
|
6957
|
+
}]
|
|
6958
|
+
}
|
|
6959
|
+
}
|
|
6791
6960
|
\`\`\`
|
|
6961
|
+
|
|
6962
|
+
2. 富文本
|
|
6963
|
+
msg_type 必填,值为 post
|
|
6964
|
+
\`\`\`json
|
|
6965
|
+
{
|
|
6966
|
+
"msg_type": "post",
|
|
6967
|
+
"post": {
|
|
6968
|
+
"zh_cn": {
|
|
6969
|
+
"title": "{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}⚠️{{else}}ℹ️{{end}} {{fireReason .}}INC #{{.Num}} {{toHtml .Title}}",
|
|
6970
|
+
"content": [
|
|
6971
|
+
[{
|
|
6972
|
+
"tag": "text",
|
|
6973
|
+
"text": "🏢 "
|
|
6974
|
+
}, {
|
|
6975
|
+
"tag": "text",
|
|
6976
|
+
"text": "协作空间:",
|
|
6977
|
+
"text_type": "bold"
|
|
6978
|
+
}, {
|
|
6979
|
+
"tag": "text",
|
|
6980
|
+
"text": "{{if .ChannelName}}{{.ChannelName}}{{else}}无{{end}}\\n"
|
|
6981
|
+
}],
|
|
6982
|
+
[{
|
|
6983
|
+
"tag": "text",
|
|
6984
|
+
"text": "{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}⚠️{{else}}ℹ️{{end}} "
|
|
6985
|
+
}, {
|
|
6986
|
+
"tag": "text",
|
|
6987
|
+
"text": "严重程度:",
|
|
6988
|
+
"text_type": "bold"
|
|
6989
|
+
}, {
|
|
6990
|
+
"tag": "text",
|
|
6991
|
+
"text": "{{.IncidentSeverity}}\\n",
|
|
6992
|
+
"text_type": "{{if eq .IncidentSeverity "Critical"}}bold{{end}}"
|
|
6993
|
+
}],
|
|
6994
|
+
[{
|
|
6995
|
+
"tag": "text",
|
|
6996
|
+
"text": "⏰ "
|
|
6997
|
+
}, {
|
|
6998
|
+
"tag": "text",
|
|
6999
|
+
"text": "触发时间:",
|
|
7000
|
+
"text_type": "bold"
|
|
7001
|
+
}, {
|
|
7002
|
+
"tag": "text",
|
|
7003
|
+
"text": "{{date "2006-01-02 15:04:05" .StartTime}}\\n"
|
|
7004
|
+
}],
|
|
7005
|
+
{{if gt .AlertCnt 1}}[{
|
|
7006
|
+
"tag": "text",
|
|
7007
|
+
"text": "🔔 "
|
|
7008
|
+
}, {
|
|
7009
|
+
"tag": "text",
|
|
7010
|
+
"text": "聚合告警:",
|
|
7011
|
+
"text_type": "bold"
|
|
7012
|
+
}, {
|
|
7013
|
+
"tag": "text",
|
|
7014
|
+
"text": "{{.AlertCnt}}条\\n"
|
|
7015
|
+
}],{{end}}
|
|
7016
|
+
{{if .Labels.resource}}[{
|
|
7017
|
+
"tag": "text",
|
|
7018
|
+
"text": "📋 "
|
|
7019
|
+
}, {
|
|
7020
|
+
"tag": "text",
|
|
7021
|
+
"text": "告警对象:",
|
|
7022
|
+
"text_type": "bold"
|
|
7023
|
+
}, {
|
|
7024
|
+
"tag": "text",
|
|
7025
|
+
"text": "{{toHtml (joinAlertLabels . "resource" ", ")}}\\n"
|
|
7026
|
+
}],{{end}}
|
|
7027
|
+
{{if .Description}}[{
|
|
7028
|
+
"tag": "text",
|
|
7029
|
+
"text": "📝 "
|
|
7030
|
+
}, {
|
|
7031
|
+
"tag": "text",
|
|
7032
|
+
"text": "描述:",
|
|
7033
|
+
"text_type": "bold"
|
|
7034
|
+
}, {
|
|
7035
|
+
"tag": "text",
|
|
7036
|
+
"text": "{{toHtml .Description}}\\n"
|
|
7037
|
+
}],{{end}}
|
|
7038
|
+
{{if gt (len .Responders) 0}}[{
|
|
7039
|
+
"tag": "text",
|
|
7040
|
+
"text": "👨💻 "
|
|
7041
|
+
}, {
|
|
7042
|
+
"tag": "text",
|
|
7043
|
+
"text": "处理人员:",
|
|
7044
|
+
"text_type": "bold"
|
|
7045
|
+
}, {
|
|
7046
|
+
"tag": "text",
|
|
7047
|
+
"text": "{{range .Responders}}@{{.PersonName}} {{end}}\\n"
|
|
7048
|
+
}],{{end}}
|
|
7049
|
+
[{
|
|
7050
|
+
"tag": "a",
|
|
7051
|
+
"href": "{{.DetailUrl}}",
|
|
7052
|
+
"text": "故障详情"
|
|
7053
|
+
},{
|
|
7054
|
+
"tag": "text",
|
|
7055
|
+
"text": " "
|
|
7056
|
+
},{
|
|
7057
|
+
"tag": "a",
|
|
7058
|
+
"href": "{{.DetailUrl}}?ack=1",
|
|
7059
|
+
"text": "认领"
|
|
7060
|
+
}]
|
|
7061
|
+
]
|
|
7062
|
+
}
|
|
7063
|
+
}
|
|
7064
|
+
}
|
|
7065
|
+
\`\`\`
|
|
7066
|
+
|
|
7067
|
+
3. 普通文本
|
|
7068
|
+
\`\`\`go
|
|
6792
7069
|
{{fireReason .}}INC #{{.Num}} {{toHtml .Title}}
|
|
6793
7070
|
-----
|
|
6794
7071
|
协作空间:{{if .ChannelName}}{{.ChannelName}}{{else}}无{{end}}
|
|
@@ -6801,8 +7078,10 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6801
7078
|
分派人员:{{range .Responders}}@{{.PersonName}} {{end}}{{end}}
|
|
6802
7079
|
<br>详情:{{.DetailUrl}}
|
|
6803
7080
|
\`\`\`
|
|
7081
|
+
</div>
|
|
6804
7082
|
|
|
6805
7083
|
|
|
7084
|
+
<div class="dingtalk hide">
|
|
6806
7085
|
|
|
6807
7086
|
## 钉钉机器人
|
|
6808
7087
|
---
|
|
@@ -6812,7 +7091,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6812
7091
|
- 如果文本中包含\`<br>\`,渲染时会\`先删除空行,再将<br>替换为换行符\`;
|
|
6813
7092
|
- 如果不设置自定义内容,将采用系统默认模板,仅展示关键信息:
|
|
6814
7093
|
|
|
6815
|
-
\`\`\`
|
|
7094
|
+
\`\`\`go
|
|
6816
7095
|
{{fireReason .}}INC [#{{.Num}}]({{.DetailUrl}}) {{toHtml .Title}}
|
|
6817
7096
|
|
|
6818
7097
|
---
|
|
@@ -6827,8 +7106,9 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6827
7106
|
---
|
|
6828
7107
|
<br>[详情]({{.DetailUrl}})|[认领]({{.DetailUrl}}?ack=1)
|
|
6829
7108
|
\`\`\`
|
|
7109
|
+
</div>
|
|
6830
7110
|
|
|
6831
|
-
|
|
7111
|
+
<div class="wecom hide">
|
|
6832
7112
|
|
|
6833
7113
|
## 企业微信机器人
|
|
6834
7114
|
---
|
|
@@ -6838,7 +7118,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6838
7118
|
- 如果文本中包含\`<br>\`,渲染时会\`先删除空行,再将<br>替换为换行符\`;
|
|
6839
7119
|
- 如果不设置自定义内容,将采用系统默认模板,仅展示关键信息:
|
|
6840
7120
|
|
|
6841
|
-
\`\`\`
|
|
7121
|
+
\`\`\`go
|
|
6842
7122
|
{{fireReason .}}**INC [#{{.Num}}]({{.DetailUrl}}) {{toHtml .Title}}**
|
|
6843
7123
|
> 协作空间:<font color="warning">{{if .ChannelName}}{{.ChannelName}}{{else}}无{{end}}</font>
|
|
6844
7124
|
> 严重程度:<font color="warning">{{.IncidentSeverity}}</font>
|
|
@@ -6850,17 +7130,19 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6850
7130
|
> 分派人员:{{range .Responders}}@{{.PersonName}} {{end}}{{end}}
|
|
6851
7131
|
<br>[详情]({{.DetailUrl}})|[认领]({{.DetailUrl}}?ack=1)
|
|
6852
7132
|
\`\`\`
|
|
7133
|
+
</div>
|
|
6853
7134
|
|
|
6854
|
-
|
|
7135
|
+
<div class="telegram hide">
|
|
6855
7136
|
|
|
6856
7137
|
## Telegram 机器人
|
|
6857
7138
|
---
|
|
7139
|
+
|
|
6858
7140
|
- 配置国内能访问的Telegram服务地址;
|
|
6859
7141
|
- 消息\`最大长度为4096字符,超出后不发送\`;
|
|
6860
7142
|
- 如果文本中包含\`<br>\`,渲染时会\`先删除空行,再将<br>替换为换行符\`;
|
|
6861
7143
|
- 如果不设置自定义内容,将采用系统默认模板,仅展示关键信息:
|
|
6862
7144
|
|
|
6863
|
-
\`\`\`
|
|
7145
|
+
\`\`\`go
|
|
6864
7146
|
{{fireReason .}}INC [#{{.Num}}]({{.DetailUrl}}) {{toHtml .Title}}
|
|
6865
7147
|
-----
|
|
6866
7148
|
协作空间:{{if .ChannelName}}{{.ChannelName}}{{else}}无{{end}}
|
|
@@ -6874,8 +7156,9 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6874
7156
|
|
|
6875
7157
|
<br>[详情]({{.DetailUrl}})|[认领]({{.DetailUrl}}?ack=1)
|
|
6876
7158
|
\`\`\`
|
|
7159
|
+
</div>
|
|
6877
7160
|
|
|
6878
|
-
|
|
7161
|
+
<div class="slack hide">
|
|
6879
7162
|
|
|
6880
7163
|
## Slack 机器人
|
|
6881
7164
|
---
|
|
@@ -6883,7 +7166,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6883
7166
|
- 如果文本中包含\`<br>\`,渲染时会\`先删除空行,再将<br>替换为换行符\`;
|
|
6884
7167
|
- 如果不设置自定义内容,将采用系统默认模板,仅展示关键信息:
|
|
6885
7168
|
|
|
6886
|
-
\`\`\`
|
|
7169
|
+
\`\`\`go
|
|
6887
7170
|
{{fireReason .}}INC <{{.DetailUrl}}|#{{.Num}}> {{toHtml .Title}}
|
|
6888
7171
|
-----
|
|
6889
7172
|
协作空间:{{if .ChannelName}}{{.ChannelName}}{{else}}无{{end}}
|
|
@@ -6897,6 +7180,9 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6897
7180
|
-----
|
|
6898
7181
|
<br><{{.DetailUrl}}|详情>|<{{.DetailUrl}}?ack=1|认领>
|
|
6899
7182
|
\`\`\`
|
|
7183
|
+
</div>
|
|
7184
|
+
|
|
7185
|
+
<div class="zoom hide">
|
|
6900
7186
|
|
|
6901
7187
|
## Zoom 机器人
|
|
6902
7188
|
---
|
|
@@ -6905,7 +7191,7 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6905
7191
|
- 消息格式 \`遵循Zoom消息格式\`,当前机器人应用不支持Markdown,其他格式可以参考官网: https://developers.zoom.us/docs/team-chat-apps/customizing-messages/
|
|
6906
7192
|
- 如果不设置自定义内容,将采用系统默认模板,仅展示关键信息:
|
|
6907
7193
|
|
|
6908
|
-
\`\`\`
|
|
7194
|
+
\`\`\`json
|
|
6909
7195
|
{"head": {
|
|
6910
7196
|
"text": "{{fireReason .}}INC [#{{.Num}}] {{toHtml .Title}}",
|
|
6911
7197
|
"style": {
|
|
@@ -6996,8 +7282,10 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
6996
7282
|
]
|
|
6997
7283
|
}
|
|
6998
7284
|
\`\`\`
|
|
7285
|
+
</div>
|
|
6999
7286
|
|
|
7000
7287
|
|
|
7288
|
+
<div class="sms hide">
|
|
7001
7289
|
|
|
7002
7290
|
## 短信
|
|
7003
7291
|
---
|
|
@@ -7006,14 +7294,15 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
7006
7294
|
\`\`\`
|
|
7007
7295
|
您有故障待处理:{{toHtml .Title}},协作空间:{{.ChannelName}},等级:{{.IncidentSeverity}}{{if gt .AlertCnt 1}},共聚合{{.AlertCnt}}条告警{{end}}
|
|
7008
7296
|
\`\`\`
|
|
7297
|
+
</div>
|
|
7009
7298
|
|
|
7010
|
-
|
|
7299
|
+
<div class="email hide">
|
|
7011
7300
|
|
|
7012
7301
|
## 邮件
|
|
7013
7302
|
---
|
|
7014
7303
|
如果不设置自定义内容,将采用系统默认模板渲染通知:
|
|
7015
7304
|
|
|
7016
|
-
\`\`\`
|
|
7305
|
+
\`\`\`html
|
|
7017
7306
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
7018
7307
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
7019
7308
|
<title>{{.Title}}</title>
|
|
@@ -7102,5 +7391,5 @@ CloseTime | int64 | 否 | 关闭时间,EndTime 为告警恢复时间,CloseTi
|
|
|
7102
7391
|
|
|
7103
7392
|
<img src="https://download.flashcat.cloud/flashduty/changelog/20230720/email_render.png" alt="drawing" style="display: block; margin: 0 auto;" width="500"/>
|
|
7104
7393
|
|
|
7105
|
-
|
|
7106
|
-
`,
|
|
7394
|
+
</div>
|
|
7395
|
+
`,tn={CustomAlert:n,Email:t,N9e:e,Prometheus:a,Grafana:i,Zabbix:s,UptimeKuma:l,AliyunARMS:d,AliyunCmEvent:o,AliyunCm:r,AliyunSLS:c,AWSCW:u,AzureMonitor:h,BaiDuBCM:m,HuaWeiCES:p,InfluxDB:g,OpenFalcon:y,PagerDuty:f,TencentBK:b,TencentCLS:v,TencentCm:w,TencentEb:_,OceanBase:k,Graylog:F,Skywalking:x,Sentry:T,Jiankongbao:A,AWSEventBridge:C,Dynatrace:S,HuaweiyunLTS:I,GoogleCM:L,Splunk:D,AppDynamics:P,SolarWinds:M,VolcEngineMetric:N,VolcEngineEvent:E,VolcEngineTLS:$,OpManager:R,Meraki:W,Zilliz:U,StateCloud:z,Guance:j,CustomChange:O,Jira:q,Lark:B,Dingtalk:J,Wecom:G,Slack:V,MicrosoftTeams:K,AlertWebhook:Z,IncidentWebhook:X,CustomAction:Y,Templates:nn,HuaweiyunAPM:H,JiraSync:Q};module.exports=tn;
|