Skip to content

Commit 86a1e0b

Browse files
committed
Merge branch 'main' of github.com:flashcatcloud/knowledge-base
2 parents ad47c7b + f71bb84 commit 86a1e0b

14 files changed

Lines changed: 1106 additions & 283 deletions

File tree

flashduty/en/1. On-call/4. Configure On-call/4.7 Templates.md

Lines changed: 111 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -893,110 +893,121 @@ Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}
893893

894894
```json
895895
{
896-
"head": {
897-
"text": "{{fireReason .}}INC [#{{.Num}}] {{.Title}}",
898-
"style": {
899-
"bold": true,
900-
"italic": false,
901-
"color": "{{$s := serverityToColor .IncidentSeverity}}{{$s}}"
902-
}
903-
},
904-
"body": [
905-
{
906-
"type": "message",
907-
"text": {{printf "%q" (print "Channel: " .ChannelName)}},
908-
"style": {
909-
"bold": false,
910-
"italic": false
911-
}
912-
},
913-
{
914-
"type": "message",
915-
"text": "Severity: {{.IncidentSeverity}}",
916-
"style": {
917-
"bold": false,
918-
"italic": false,
919-
"color": "{{$s := serverityToColor .IncidentSeverity}}{{$s}}"
920-
}
921-
},
922-
{
923-
"type": "message",
924-
"text": "{{if .AlertCnt}}Grouped alerts: {{.AlertCnt}}{{end}}",
925-
"style": {
926-
"bold": false,
927-
"italic": false
928-
}
929-
},
930-
{{if .Labels.resource}}
931-
{
932-
"type": "message",
933-
"text": {{printf "%q" (print "Resources: " (joinAlertLabels . "resource" ", "))}},
896+
"content": {
897+
"head": {
898+
"text": "{{fireReason .}}INC [#{{.Num}}] {{.Title}}",
934899
"style": {
935-
"bold": false,
936-
"italic": false
900+
"bold": true,
901+
"italic": false,
902+
"color": "{{$s := serverityToColor .IncidentSeverity}}{{$s}}"
937903
}
938-
},
939-
{{end}}{{if .Labels.body_text}}
940-
{
941-
"type": "message",
942-
"text": {{printf "%q" (print "Description: " .Labels.body_text)}},
943-
"style": {
944-
"bold": false,
945-
"italic": false
904+
},
905+
"body": [
906+
{
907+
"type": "message",
908+
"text": {{printf "%q" (print "Channel: " .ChannelName)}},
909+
"style": {
910+
"bold": false,
911+
"italic": false
912+
}
913+
},
914+
{
915+
"type": "message",
916+
"text": "Severity: {{.IncidentSeverity}}",
917+
"style": {
918+
"bold": false,
919+
"italic": false,
920+
"color": "{{$s := serverityToColor .IncidentSeverity}}{{$s}}"
921+
}
946922
}
923+
{{- if .AlertCnt -}},
924+
{
925+
"type": "message",
926+
"text": "Grouped alerts: {{.AlertCnt}}",
927+
"style": {
928+
"bold": false,
929+
"italic": false
930+
}
931+
}
932+
{{- end -}}
933+
{{- if .Labels.resource -}},
934+
{
935+
"type": "message",
936+
"text": {{printf "%q" (print "Resources: " (joinAlertLabels . "resource" ", "))}},
937+
"style": {
938+
"bold": false,
939+
"italic": false
940+
}
941+
}
942+
{{- end -}}
943+
{{- if .Labels.body_text -}},
944+
{
945+
"type": "message",
946+
"text": {{printf "%q" (print "Description: " .Labels.body_text)}},
947+
"style": {
948+
"bold": false,
949+
"italic": false
950+
}
951+
}
952+
{{- else if .Description -}},
953+
{
954+
"type": "message",
955+
"text": {{printf "%q" (print "Description: " .Description)}},
956+
"style": {
957+
"bold": false,
958+
"italic": false
959+
}
960+
}
961+
{{- end -}}
962+
{{- if gt (len .Responders) 0 -}},
963+
{
964+
"type": "message",
965+
"text": "Responders: {{range .Responders}}@{{.PersonName}}{{end}}",
966+
"style": {
967+
"bold": false,
968+
"italic": false
969+
}
970+
}
971+
{{- end -}},
972+
{
973+
"type": "message",
974+
"text": "Details: {{.DetailUrl}}",
975+
"style": {
976+
"bold": true,
977+
"italic": false
978+
}
979+
},
980+
{
981+
"type": "message",
982+
"text": "Ack: {{.DetailUrl}}?ack=1",
983+
"style": {
984+
"bold": true,
985+
"italic": false
986+
}
987+
}
988+
{{- if .IsFlapping -}},
989+
{
990+
"type": "message",
991+
"text": "🔴 The current incident status changes frequently, notifications will be muted for {{.Flapping.MuteMinutes}} minute(s), it is recommended to optimize the alerting strategy.",
992+
"style": {
993+
"bold": true,
994+
"italic": false
995+
}
996+
}
997+
{{- end -}}
998+
{{- if .IsInStorm -}},
999+
{
1000+
"type": "message",
1001+
"text": "🔴 The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm, please handle it urgently!",
1002+
"style": {
1003+
"bold": true,
1004+
"italic": false
1005+
}
1006+
}
1007+
{{- end -}}
1008+
]
9471009
},
948-
{{else if .Description}}
949-
{
950-
"type": "message",
951-
"text": {{printf "%q" (print "Description: " .Description)}},
952-
"style": {
953-
"bold": false,
954-
"italic": false
955-
}
956-
},
957-
{{end}}{{if gt (len .Responders) 0}}
958-
{
959-
"type": "message",
960-
"text": "Responders: {{range .Responders}}@{{.PersonName}}{{end}}",
961-
"style": {
962-
"bold": false,
963-
"italic": false
964-
}
965-
},
966-
{{end}}
967-
{
968-
"type": "message",
969-
"text": "Details: {{.DetailUrl}}",
970-
"style": {
971-
"bold": true,
972-
"italic": false
973-
}
974-
},
975-
{
976-
"type": "message",
977-
"text": "Ack: {{.DetailUrl}}?ack=1",
978-
"style": {
979-
"bold": true,
980-
"italic": false
981-
}
982-
},
983-
{
984-
"type": "message",
985-
"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}}",
986-
"style": {
987-
"bold": true,
988-
"italic": false
989-
}
990-
},
991-
{
992-
"type": "message",
993-
"text": "{{if .IsInStorm}}🔴 The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm, please handle it urgently!{{end}}",
994-
"style": {
995-
"bold": true,
996-
"italic": false
997-
}
998-
}
999-
]
1010+
"is_markdown_support": true
10001011
}
10011012
```
10021013
</div>
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: "Volcengine Cloud-Detect Alert Events"
3+
description: "Sync Volcengine Cloud-Detect alert events to Flashduty via webhook for automated alert noise reduction"
4+
date: "2024-07-05T10:00:00+08:00"
5+
url: "https://docs.flashcat.cloud/en/flashduty/volcengine-tls-integration-guide"
6+
---
7+
8+
Sync Volcengine Cloud-Detect alert events to Flashduty via webhook for automated alert noise reduction.
9+
10+
<div class="hide">
11+
12+
## In Flashduty
13+
---
14+
You can obtain an integration push URL through either of these two methods:
15+
16+
### Using Private Integration
17+
18+
Choose this method when you don't need to route alert events to different channels - it's simpler.
19+
20+
<details>
21+
<summary>Expand</summary>
22+
23+
1. Go to the Flashduty console, select **Channel**, and enter a channel's details page
24+
2. Select the **Integrations** tab, click **Add Integration** to enter the integration page
25+
3. Choose **Volcengine Detect** integration and click **Save** to generate a card
26+
4. Click the generated card to view the **Push URL**, copy it for later use, and you're done
27+
28+
</details>
29+
30+
### Using Shared Integration
31+
32+
Choose this method when you need to route alerts to different channels based on the alert event payload.
33+
34+
<details>
35+
<summary>Expand</summary>
36+
37+
1. Go to the Flashduty console, select **Integration Center=>Alert Events** to enter the integration selection page
38+
2. Select **Volcengine Detect** integration:
39+
- **Integration Name**: Define a name for this integration
40+
3. Configure the default route and select the corresponding channel (after the integration is created, you can go to `Route` to configure more routing rules)
41+
4. Click **Save** and copy the newly generated **push URL** for later use
42+
5. Done
43+
44+
</details>
45+
</div>
46+
47+
## In Volcengine
48+
---
49+
50+
<div class="md-block">
51+
52+
## 一、Create Notification Object
53+
54+
### Step 1: Create Notification Object
55+
1. Login to your `Volcengine` console, find `Alert Manager` in the `Notify Object` menu
56+
2. Click `System Integration`, click `Create System Integration` or edit the existing endpoint
57+
3. 在编辑页面中,名称填写 `Flashduty``回调 URL` 处填写告警集成的<span class='integration_url'>推送地址</span>。
58+
5. Click `OK` to complete the configuration
59+
60+
<img alt="drawing" width="600" src="https://download.flashcat.cloud/flashduty/doc/zh/fd/volcengine-1.png" />
61+
62+
### Step 2: Use Notification Object in Alert Policy
63+
1. Login to your `Volcengine` console, find `Alert Manager` in the `Alert Policy` menu
64+
2. Click `Create Alert Policy` or edit the existing alert policy
65+
3. In the edit page, select the created `Flashduty` Endpoint
66+
4. Configure other settings as needed, and click `OK` to complete the configuration
67+
68+
<img alt="drawing" width="600" src="https://download.flashcat.cloud/flashduty/doc/zh/fd/volcengine-2.png" />
69+
70+
</dev>
71+
72+
## 二、Status Mapping
73+
74+
<div class="md-block">
75+
76+
| Detect | Flashduty | Status |
77+
| ---------- | -------- | ---- |
78+
| P0 | Critical | Critical|
79+
| P2 | Warning | Warning|
80+
81+
</div>
82+

0 commit comments

Comments
 (0)