Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
211 changes: 111 additions & 100 deletions flashduty/en/1. On-call/4. Configure On-call/4.7 Templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -893,110 +893,121 @@ Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}

```json
{
"head": {
"text": "{{fireReason .}}INC [#{{.Num}}] {{.Title}}",
"style": {
"bold": true,
"italic": false,
"color": "{{$s := serverityToColor .IncidentSeverity}}{{$s}}"
}
},
"body": [
{
"type": "message",
"text": {{printf "%q" (print "Channel: " .ChannelName)}},
"style": {
"bold": false,
"italic": false
}
},
{
"type": "message",
"text": "Severity: {{.IncidentSeverity}}",
"style": {
"bold": false,
"italic": false,
"color": "{{$s := serverityToColor .IncidentSeverity}}{{$s}}"
}
},
{
"type": "message",
"text": "{{if .AlertCnt}}Grouped alerts: {{.AlertCnt}}{{end}}",
"style": {
"bold": false,
"italic": false
}
},
{{if .Labels.resource}}
{
"type": "message",
"text": {{printf "%q" (print "Resources: " (joinAlertLabels . "resource" ", "))}},
"content": {
"head": {
"text": "{{fireReason .}}INC [#{{.Num}}] {{.Title}}",
"style": {
"bold": false,
"italic": false
"bold": true,
"italic": false,
"color": "{{$s := serverityToColor .IncidentSeverity}}{{$s}}"
}
},
{{end}}{{if .Labels.body_text}}
{
"type": "message",
"text": {{printf "%q" (print "Description: " .Labels.body_text)}},
"style": {
"bold": false,
"italic": false
},
"body": [
{
"type": "message",
"text": {{printf "%q" (print "Channel: " .ChannelName)}},
"style": {
"bold": false,
"italic": false
}
},
{
"type": "message",
"text": "Severity: {{.IncidentSeverity}}",
"style": {
"bold": false,
"italic": false,
"color": "{{$s := serverityToColor .IncidentSeverity}}{{$s}}"
}
}
{{- if .AlertCnt -}},
{
"type": "message",
"text": "Grouped alerts: {{.AlertCnt}}",
"style": {
"bold": false,
"italic": false
}
}
{{- end -}}
{{- if .Labels.resource -}},
{
"type": "message",
"text": {{printf "%q" (print "Resources: " (joinAlertLabels . "resource" ", "))}},
"style": {
"bold": false,
"italic": false
}
}
{{- end -}}
{{- if .Labels.body_text -}},
{
"type": "message",
"text": {{printf "%q" (print "Description: " .Labels.body_text)}},
"style": {
"bold": false,
"italic": false
}
}
{{- else if .Description -}},
{
"type": "message",
"text": {{printf "%q" (print "Description: " .Description)}},
"style": {
"bold": false,
"italic": false
}
}
{{- end -}}
{{- if gt (len .Responders) 0 -}},
{
"type": "message",
"text": "Responders: {{range .Responders}}@{{.PersonName}}{{end}}",
"style": {
"bold": false,
"italic": false
}
}
{{- end -}},
{
"type": "message",
"text": "Details: {{.DetailUrl}}",
"style": {
"bold": true,
"italic": false
}
},
{
"type": "message",
"text": "Ack: {{.DetailUrl}}?ack=1",
"style": {
"bold": true,
"italic": false
}
}
{{- if .IsFlapping -}},
{
"type": "message",
"text": "🔴 The current incident status changes frequently, notifications will be muted for {{.Flapping.MuteMinutes}} minute(s), it is recommended to optimize the alerting strategy.",
"style": {
"bold": true,
"italic": false
}
}
{{- end -}}
{{- if .IsInStorm -}},
{
"type": "message",
"text": "🔴 The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm, please handle it urgently!",
"style": {
"bold": true,
"italic": false
}
}
{{- end -}}
]
},
{{else if .Description}}
{
"type": "message",
"text": {{printf "%q" (print "Description: " .Description)}},
"style": {
"bold": false,
"italic": false
}
},
{{end}}{{if gt (len .Responders) 0}}
{
"type": "message",
"text": "Responders: {{range .Responders}}@{{.PersonName}}{{end}}",
"style": {
"bold": false,
"italic": false
}
},
{{end}}
{
"type": "message",
"text": "Details: {{.DetailUrl}}",
"style": {
"bold": true,
"italic": false
}
},
{
"type": "message",
"text": "Ack: {{.DetailUrl}}?ack=1",
"style": {
"bold": true,
"italic": false
}
},
{
"type": "message",
"text": "{{if .IsFlapping}}🔴 The current incident status changes frequently, notifications will be muted for {{.Flapping.MuteMinutes}} minute(s), it is recommended to optimize the alerting strategy.{{end}}",
"style": {
"bold": true,
"italic": false
}
},
{
"type": "message",
"text": "{{if .IsInStorm}}🔴 The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm, please handle it urgently!{{end}}",
"style": {
"bold": true,
"italic": false
}
}
]
"is_markdown_support": true
}
```
</div>
Expand Down
25 changes: 7 additions & 18 deletions flashduty/zh/1. On-call/3. 配置管理/4.13 通知机器人.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,24 +269,13 @@ FlashDuty 支持多种通知渠道,包括手机短信、邮件、语音通话

**配置步骤:**

1. **安装 Incoming Webhook 应用**
- 在 Zoom App 中搜索 "Incoming Webhook"
- 点击"添加"安装应用

2. **连接 FlashDuty**
- 在频道或 Incoming Webhook 应用中输入:`/inc connect flashduty`
- 应用将返回连接信息

3. **配置 Webhook 信息**
- 复制 Endpoint 中的标识符(例如:`V9S5as-zTXOSUdgMITNEwA`)
- 将其填入 FlashDuty 通知渠道的 Webhook 地址
- 复制 Verification Token 并填入对应字段

4. **添加成员**
- 点击 Incoming Webhook 右上角的成员管理
- 添加相关人员

> **注意:** 如需使用 @ 功能,请联系管理员
1. 打开 Zoom 应用,进入 Add Apps,搜索并添加 Incoming Webhook 应用。
2. 返回聊天界面,确认已成功添加“Incoming Webhook”应用。
3. 在频道或 Incoming Webhook 应用中输入命令:
/inc connect flashduty 系统会返回应用连接信息。
- 复制返回信息中的 Endpoint 地址(如:https://integrations.zoom.us/chat/webhooks/incomingwebhook/V9S5as-zTXOSUdgMITNEwA),将其填写到通知渠道的 Zoom 机器人 Webhook 地址或 Token 字段中。
4. 复制返回信息中的 Verification Token,填写到通知渠道的 Zoom 机器人 Verify Token 字段中。
5. 如需使用 @ 功能,需保证 Zoom 和 Flashduty 中的邮箱一致。管理员可在 Zoom 控制后台获取 zoom 的 user_id,并在 Flashduty 的集成中心-映射数据中创建映射表(源标签填写 email,结果标签填写 zoom_jid),最后在协作空间-分派策略中关联对应 Zoom 机器人和 映射表。

<img src="https://api.apifox.com/api/v1/projects/4169655/resources/436270/image-preview" alt="Zoom 机器人配置界面" style="display: block; margin: 0 auto;" width="500">

Expand Down
Loading