flashduty-knowledge-base 1.2.4 → 1.2.5-beta.2
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 +2 -0
- package/dist/esm/en.js +749 -184
- package/dist/esm/zh.js +476 -98
- package/dist/iife/en.js +738 -173
- package/dist/iife/zh.js +460 -82
- package/dist/zh.d.ts +2 -0
- package/package.json +2 -2
package/dist/iife/en.js
CHANGED
|
@@ -311,7 +311,7 @@ attachment_stripped = true
|
|
|
311
311
|
|
|
312
312
|
Currently, all alerts pushed to Flashduty through email integration are set to Warning severity.
|
|
313
313
|
|
|
314
|
-
`,
|
|
314
|
+
`,i=`---
|
|
315
315
|
title: "Nightingale/FlashCat Integration"
|
|
316
316
|
description: "Push alert events from Nightingale (n9e) or Flashcat to Flashduty via webhook. When an alert is triggered, send a trigger event to Flashduty; when an alert recovers, send a recovery event to Flashduty"
|
|
317
317
|
date: "2024-05-11T10:00:00+08:00"
|
|
@@ -469,7 +469,7 @@ Nightingale/Flashcat to Flashduty alert severity mapping:
|
|
|
469
469
|
|
|
470
470
|
</details>
|
|
471
471
|
|
|
472
|
-
`,
|
|
472
|
+
`,o=`---
|
|
473
473
|
title: "Prometheus Integration Guide"
|
|
474
474
|
description: "Push Prometheus alert events to Flashduty through AlertManager using webhooks. When an alert is triggered, it sends a trigger event to Flashduty, and when the alert recovers, it sends a recovery event."
|
|
475
475
|
date: "2024-05-11T10:00:00+08:00"
|
|
@@ -1554,7 +1554,7 @@ Alibaba Cloud SLS monitoring to Flashduty alert severity mapping:
|
|
|
1554
1554
|
| 2 | Info | Info |
|
|
1555
1555
|
|
|
1556
1556
|
</div>
|
|
1557
|
-
`,u={CustomAlert:t,Email:a,N9e:
|
|
1557
|
+
`,u={CustomAlert:t,Email:a,N9e:i,Prometheus:o,Grafana:s,Zabbix:r,UptimeKuma:l,AliyunARMS:d,AliyunCmEvent:c,AliyunCm:h,AliyunSLS:e,AWSCW:e,AzureMonitor:`---
|
|
1558
1558
|
title: "AWS CloudWatch Integration"
|
|
1559
1559
|
description: "Sync AWS CloudWatch alert events to Flashduty via webhook to achieve automated alert noise reduction"
|
|
1560
1560
|
date: "2024-05-11T10:00:00+08:00"
|
|
@@ -5480,6 +5480,7 @@ The following event types are currently supported, with more potentially being a
|
|
|
5480
5480
|
| i_rslv | Close incident (automatically or manually) |
|
|
5481
5481
|
| i_reopen | Reopen incident |
|
|
5482
5482
|
| i_merge | Manually merge incidents |
|
|
5483
|
+
| i_comm | Add comment |
|
|
5483
5484
|
| i_r_title | Update incident title |
|
|
5484
5485
|
| i_r_desc | Update incident description |
|
|
5485
5486
|
| i_r_impact | Update incident impact |
|
|
@@ -5925,25 +5926,25 @@ url: "https://docs.flashcat.cloud/en/flashduty/template-settings"
|
|
|
5925
5926
|
|
|
5926
5927
|
## When Are Templates Used?
|
|
5927
5928
|
---
|
|
5928
|
-
The system uses templates to render [Incident](#Incident)
|
|
5929
|
+
The system uses templates to render [Incident](#Incident) when assigning incidents, which may occur in the following scenarios:
|
|
5929
5930
|
|
|
5930
5931
|
1. Manually create and assign an incident
|
|
5931
5932
|
2. When an alert event is reported, the system automatically generates an incident and assigns it according to the matched escalation rule
|
|
5932
5933
|
3. After an incident is created, manually change the assignment (reassign)
|
|
5933
|
-
4.
|
|
5934
|
+
4. System automatically escalates according to escalation rule settings
|
|
5934
5935
|
5. When reopening a closed incident, reassign according to previous settings
|
|
5935
5936
|
|
|
5936
|
-
We use \`Golang template syntax\` [template/html](https://pkg.go.dev/html/template@go1.18.1) to parse data,
|
|
5937
|
+
We use \`Golang template syntax\` [template/html](https://pkg.go.dev/html/template@go1.18.1) to parse data, enabling you to accomplish any complex rendering requirements.
|
|
5937
5938
|
|
|
5938
|
-
- For documentation, please refer to [here](https://www.topgoer.com/%E5%B8%B8%E7%94%A8%E6%A0%87%E5%87%86%E5%BA%93/template.html#%E6%A8%A1%E6%9D%BF%E8%AF%AD%E6%B3%95), supporting logical conditions, loops, pipelines and common functions
|
|
5939
|
-
- We
|
|
5940
|
-
- If you
|
|
5939
|
+
- For documentation, please refer to [here](https://www.topgoer.com/%E5%B8%B8%E7%94%A8%E6%A0%87%E5%87%86%E5%BA%93/template.html#%E6%A8%A1%E6%9D%BF%E8%AF%AD%E6%B3%95), supporting logical conditions, loops, pipelines, and common functions;
|
|
5940
|
+
- We've incorporated the open-source library [sprig](https://github.com/flashcatcloud/sprig/tree/flashcat), which includes hundreds of common functions that you can directly call in templates;
|
|
5941
|
+
- If you wish to introduce more functions, feel free to submit a merge request
|
|
5941
5942
|
|
|
5942
5943
|
## What Variables Can I Reference?
|
|
5943
5944
|
---
|
|
5944
5945
|
**Variable Reference Examples**:
|
|
5945
5946
|
|
|
5946
|
-
\`\`\`
|
|
5947
|
+
\`\`\`go
|
|
5947
5948
|
// Reference title
|
|
5948
5949
|
{{.Title}}
|
|
5949
5950
|
|
|
@@ -5965,7 +5966,7 @@ ID | string | Yes | Incident ID
|
|
|
5965
5966
|
\`Title\` | string | Yes | Incident title
|
|
5966
5967
|
\`Description\` | string | Yes | Incident description, can be empty
|
|
5967
5968
|
DetailUrl | string | Yes | Incident detail page URL
|
|
5968
|
-
Num | string | Yes | Short incident identifier, for easy visual recognition
|
|
5969
|
+
Num | string | Yes | Short incident identifier, for easy visual recognition, may be duplicate
|
|
5969
5970
|
\`IncidentSeverity\` | string | Yes | Severity level, enum values: Critical, Warning, Info
|
|
5970
5971
|
IncidentStatus | string | Yes | Incident status, enum values: Critical, Warning, Info, Ok
|
|
5971
5972
|
\`Progress\` | string | Yes | Processing progress, enum values: Triggered, Processing, Closed
|
|
@@ -5974,19 +5975,19 @@ LastTime | int64 | No | Latest event time, latest incorporated event time in ass
|
|
|
5974
5975
|
EndTime | int64 | No | Recovery time, when all associated alerts recover, the incident will automatically recover and close. Unix timestamp in seconds, default 0
|
|
5975
5976
|
SnoozedBefore | int64 | No | Snooze end time, Unix timestamp in seconds, default 0
|
|
5976
5977
|
AckTime | int64 | No | First acknowledgment time, Unix timestamp in seconds, default 0
|
|
5977
|
-
CloseTime | int64 | No | Close time, end_time is incident recovery time, close_time is processing progress close time. Incident automatically closes
|
|
5978
|
-
Creator | [Person](#Person) | No | Creator information,
|
|
5979
|
-
Closer | [Person](#Person) | No | Closer information,
|
|
5978
|
+
CloseTime | int64 | No | Close time, end_time is incident recovery time, close_time is processing progress close time. Incident automatically closes upon recovery, manual closure doesn't affect recovery. Unix timestamp in seconds, default 0
|
|
5979
|
+
Creator | [Person](#Person) | No | Creator information, not present when automatically generated by system
|
|
5980
|
+
Closer | [Person](#Person) | No | Closer information, not present when incident recovers automatically
|
|
5980
5981
|
AssignedTo | [Assignment](Assignment) | No | Assignment configuration
|
|
5981
|
-
Responders | [][Responder](#Responder) | No |
|
|
5982
|
+
Responders | [][Responder](#Responder) | No | Responder list, initialized based on assignment configuration, also includes records if non-assigned personnel acknowledge the incident
|
|
5982
5983
|
ChannelID | int64 | No | Channel ID, value is 0 when manually creating global incident
|
|
5983
5984
|
ChannelName | string | No | Channel name
|
|
5984
5985
|
GroupMethod | string | No | Grouping method, enum values: n: no grouping, p: rule-based grouping, i: intelligent grouping
|
|
5985
|
-
\`Labels\` | map[string]string | No | Label key-value pairs, both Key and Value are strings. No information when manually created,
|
|
5986
|
+
\`Labels\` | map[string]string | No | Label key-value pairs, both Key and Value are strings. No information when manually created, contains first alert's label information when automatically created
|
|
5986
5987
|
AlertCnt | int64 | Yes | Number of associated alerts
|
|
5987
5988
|
Alerts | [][Alert](#Alert) | No | Associated alert details, no information when manually created
|
|
5988
5989
|
FireType | string | No | Notification type, enum values: fire: notify, refire: loop notification
|
|
5989
|
-
IsFlapping | bool | No | Whether in flapping state, i.e
|
|
5990
|
+
IsFlapping | bool | No | Whether in flapping state, i.e., frequent occurrence and recovery, related to convergence configuration
|
|
5990
5991
|
Impact | string | No | Incident impact, filled after incident closure
|
|
5991
5992
|
RootCause | string | No | Root cause, filled after incident closure
|
|
5992
5993
|
Resolution | string | No | Resolution, filled after incident closure
|
|
@@ -6003,11 +6004,11 @@ email | string | Yes | Email address
|
|
|
6003
6004
|
**Assignment** (Indirect Reference):
|
|
6004
6005
|
Field|Type|Required|Description
|
|
6005
6006
|
:-:|:-:|:-:|:---
|
|
6006
|
-
PersonIDs | []string| No |
|
|
6007
|
+
PersonIDs | []string| No | Person ID list, exists only when assigning by person
|
|
6007
6008
|
EscalateRuleID | string | No | Escalation rule ID, exists only when assigning by rule
|
|
6008
6009
|
EscalateRuleName | string | No | Escalation rule name
|
|
6009
6010
|
LayerIdx | string | No | Assignment level, corresponds to escalation rule level index, starts from 0
|
|
6010
|
-
Type | string | Yes | Assignment type, enum values: assign: assign, reassign: reassign, escalate:
|
|
6011
|
+
Type | string | Yes | Assignment type, enum values: assign: assign, reassign: reassign, escalate: escalation assign, reopen: reopen assign
|
|
6011
6012
|
|
|
6012
6013
|
<span id="Responder"></span>
|
|
6013
6014
|
**Responder** (Indirect Reference):
|
|
@@ -6030,44 +6031,44 @@ AlertStatus | string | Yes | Alert status, enum values: Critical, Warning, Info,
|
|
|
6030
6031
|
Progress | string | Yes | Processing progress, enum values: Triggered, Processing, Closed
|
|
6031
6032
|
StartTime | int64 | Yes | Trigger time, Unix timestamp in seconds
|
|
6032
6033
|
EndTime | int64 | No | Recovery time, Unix timestamp in seconds, default 0
|
|
6033
|
-
CloseTime | int64 | No | Close time, EndTime is alert recovery time, CloseTime is processing progress close time. Alert automatically closes
|
|
6034
|
+
CloseTime | int64 | No | Close time, EndTime is alert recovery time, CloseTime is processing progress close time. Alert automatically closes upon recovery, manual closure doesn't affect alert recovery. Unix timestamp in seconds, default 0
|
|
6034
6035
|
\`Labels\` | map[string]string | No | Label key-value pairs, both Key and Value are strings
|
|
6035
6036
|
|
|
6036
|
-
##
|
|
6037
|
+
## Common Questions
|
|
6037
6038
|
---
|
|
6038
|
-
1. **How do I know what label information is in \`Labels\`?**
|
|
6039
|
+
1. **How do I know what label information is available in \`Labels\`?**
|
|
6039
6040
|
|
|
6040
6041
|
- Manually created incidents have no labels
|
|
6041
|
-
- Automatically created incidents have labels,
|
|
6042
|
+
- Automatically created incidents have labels, matching the first incorporated alert's labels. Go to the \`Incidents\` page, find an incident and view its details to see all label information
|
|
6042
6043
|
|
|
6043
6044
|
2. **Why is the \`default template\` used when I configured custom template rendering?**
|
|
6044
6045
|
|
|
6045
6046
|
- When creating a custom template, the system uses mock data to render the template to check for syntax errors
|
|
6046
|
-
- Mock data has limited coverage and may not match some
|
|
6047
|
-
-
|
|
6048
|
-
- When unsure if a referenced variable exists, it's recommended to use logical conditions to avoid rendering
|
|
6047
|
+
- Mock data has limited coverage and may not match some logic branches in your template during actual operation
|
|
6048
|
+
- If rendering fails, the system will use the default template as a fallback to ensure message delivery
|
|
6049
|
+
- When unsure if a referenced variable exists, it's recommended to use logical conditions to avoid rendering errors, e.g., for the \`resource\` label:
|
|
6049
6050
|
|
|
6050
|
-
\`\`\`
|
|
6051
|
+
\`\`\`go
|
|
6051
6052
|
// Wrong approach: directly read label
|
|
6052
6053
|
{{.Labels.resource}}
|
|
6053
6054
|
|
|
6054
|
-
// Recommended
|
|
6055
|
+
// Recommended: check first, then read label
|
|
6055
6056
|
{{if .Labels.resource}}{{.Labels.resource}}{{end}}
|
|
6056
6057
|
\`\`\`
|
|
6057
6058
|
|
|
6058
|
-
3. **Why are characters like ">" \`escaped\` in
|
|
6059
|
+
3. **Why are characters like ">" \`escaped\` in incident titles?**
|
|
6059
6060
|
|
|
6060
|
-
\`\`\`
|
|
6061
|
+
\`\`\`go
|
|
6061
6062
|
// Use toHtml function
|
|
6062
6063
|
{{toHtml .Title}}
|
|
6063
6064
|
|
|
6064
|
-
// Use first non-empty value for rendering,
|
|
6065
|
+
// Use first non-empty value for rendering, avoiding complex if logic
|
|
6065
6066
|
{{toHtml .Title .TitleEnglish}}
|
|
6066
6067
|
\`\`\`
|
|
6067
6068
|
|
|
6068
|
-
4. **Time variables are timestamps, how
|
|
6069
|
+
4. **Time variables are timestamps, how do I \`convert time formats\`?**
|
|
6069
6070
|
|
|
6070
|
-
\`\`\`
|
|
6071
|
+
\`\`\`go
|
|
6071
6072
|
// date function converts timestamp to readable format
|
|
6072
6073
|
// "2006-01-02 15:04:05" is a common format, search online for more formats
|
|
6073
6074
|
{{date "2006-01-02 15:04:05" .StartTime}}
|
|
@@ -6077,24 +6078,24 @@ CloseTime | int64 | No | Close time, EndTime is alert recovery time, CloseTime i
|
|
|
6077
6078
|
\`\`\`
|
|
6078
6079
|
|
|
6079
6080
|
5. **How to reference external variables inside a for loop?**
|
|
6080
|
-
\`\`\`
|
|
6081
|
+
\`\`\`go
|
|
6081
6082
|
// Add "$" before external variables
|
|
6082
6083
|
{{range .Responders}}
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6084
|
+
{{if eq $.Progress "Triggered"}}
|
|
6085
|
+
[Pending]{{.Email}}
|
|
6086
|
+
{{end}}
|
|
6086
6087
|
{{end}}
|
|
6087
6088
|
\`\`\`
|
|
6088
|
-
6. **How
|
|
6089
|
+
6. **How do I extract field values with "." in names, like "obj.instance" in labels?**
|
|
6089
6090
|
|
|
6090
|
-
\`\`\`
|
|
6091
|
+
\`\`\`go
|
|
6091
6092
|
// Use index function
|
|
6092
6093
|
{{index .Labels "obj.instance"}}
|
|
6093
6094
|
\`\`\`
|
|
6094
6095
|
|
|
6095
|
-
7. **How
|
|
6096
|
+
7. **How do I extract and deduplicate label information from incident-associated alerts?**
|
|
6096
6097
|
|
|
6097
|
-
\`\`\`
|
|
6098
|
+
\`\`\`go
|
|
6098
6099
|
// Use alertLabels function to get deduplicated array
|
|
6099
6100
|
{{alertLabels . "resource"}}
|
|
6100
6101
|
|
|
@@ -6102,9 +6103,9 @@ CloseTime | int64 | No | Close time, EndTime is alert recovery time, CloseTime i
|
|
|
6102
6103
|
{{joinAlertLabels . "resource" "sep"}}
|
|
6103
6104
|
\`\`\`
|
|
6104
6105
|
|
|
6105
|
-
8. **How
|
|
6106
|
+
8. **How do I iterate and print labels?**
|
|
6106
6107
|
|
|
6107
|
-
\`\`\`
|
|
6108
|
+
\`\`\`go
|
|
6108
6109
|
// Complete iteration
|
|
6109
6110
|
{{range $k, $v := .Labels}}
|
|
6110
6111
|
{{$k}} : {{toHtml $v}}
|
|
@@ -6124,36 +6125,38 @@ CloseTime | int64 | No | Close time, EndTime is alert recovery time, CloseTime i
|
|
|
6124
6125
|
{{end}}
|
|
6125
6126
|
{{end}}
|
|
6126
6127
|
|
|
6127
|
-
9. **How
|
|
6128
|
+
9. **How do I extract information from JSON fields?**
|
|
6128
6129
|
|
|
6129
|
-
-
|
|
6130
|
-
- Target data
|
|
6130
|
+
- jsonGet function helps extract values from JSON format data using path
|
|
6131
|
+
- Target data for jsonGet function must be valid JSON
|
|
6131
6132
|
- Basic usage: {{jsonGet .Labels.xxx "yyy"}}, where xxx must be valid JSON and yyy is a valid extraction path
|
|
6132
6133
|
- For JSON path syntax, refer to [gjson.dev](https://gjson.dev/), where you can input target data and extraction path for real-time preview
|
|
6133
6134
|
|
|
6134
|
-
\`\`\`
|
|
6135
|
+
\`\`\`go
|
|
6135
6136
|
// Extract detail_url field from rule_note label
|
|
6136
6137
|
{{jsonGet .Labels.rule_note "detail_url"}}
|
|
6137
6138
|
|
|
6138
6139
|
// Extract name field from first element in JSON array
|
|
6139
6140
|
{{jsonGet .Labels.slice "0.name"}}
|
|
6140
6141
|
|
|
6141
|
-
// Iterate
|
|
6142
|
+
// Iterate through JSON array elements, match instanceId field of object with userId==7777
|
|
6142
6143
|
{{jsonGet .Labels.rule_note "#(userId==7777)#.instanceId" }}
|
|
6143
6144
|
|
|
6144
6145
|
\`\`\`
|
|
6145
6146
|
|
|
6146
|
-
10. **
|
|
6147
|
+
10. **How do I find more functions and their usage examples?**
|
|
6147
6148
|
- Function list: https://github.com/flashcatcloud/sprig/blob/master/functions.go#L97
|
|
6148
|
-
- Usage examples: Check corresponding _test.go files, e.g
|
|
6149
|
+
- Usage examples: Check corresponding _test.go files, e.g., date function test cases at https://github.com/flashcatcloud/sprig/blob/master/date_test.go
|
|
6150
|
+
|
|
6151
|
+
Below are specific instructions for each notification channel.
|
|
6149
6152
|
|
|
6150
|
-
|
|
6153
|
+
<div class="feishu_app hide">
|
|
6151
6154
|
|
|
6152
6155
|
## Feishu/Lark App
|
|
6153
6156
|
---
|
|
6154
|
-
You need to configure \`Integration Center
|
|
6157
|
+
You need to configure \`Integration Center-Instant Message-Feishu\` integration first to send message cards. If custom content is not set, the system default template will be used, rendering all label information:
|
|
6155
6158
|
|
|
6156
|
-
\`\`\`
|
|
6159
|
+
\`\`\`go
|
|
6157
6160
|
{{if .Description}}**description** :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6158
6161
|
{{if .Labels.resource}}**resource** : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6159
6162
|
{{range $k, $v := .Labels}}
|
|
@@ -6162,15 +6165,14 @@ You need to configure \`Integration Center - IM - Feishu/Lark\` integration firs
|
|
|
6162
6165
|
|
|
6163
6166
|
As shown below:
|
|
6164
6167
|
|
|
6165
|
-
<img src="https://download.flashcat.cloud/flashduty/
|
|
6166
|
-
|
|
6168
|
+
<img src="https://download.flashcat.cloud/flashduty/changelog/20230720/feishu_app_render.png" alt="drawing" style="display: block; margin: 0 auto;" width="500"/>
|
|
6167
6169
|
|
|
6168
|
-
If you want to display only key label information, you can refer to the code
|
|
6170
|
+
If you want to display only key label information, you can refer to the code segment below:
|
|
6169
6171
|
|
|
6170
|
-
- We've listed some common labels
|
|
6171
|
-
- In Feishu
|
|
6172
|
+
- We've listed some common labels, you can add or remove as needed
|
|
6173
|
+
- In Feishu app, the system will automatically remove empty rendered lines (due to non-existent labels), so you can configure freely
|
|
6172
6174
|
|
|
6173
|
-
\`\`\`
|
|
6175
|
+
\`\`\`go
|
|
6174
6176
|
{{if (index .Labels "resource")}}resource:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6175
6177
|
{{if (index .Labels "check")}}check:{{toHtml (index .Labels "check")}}{{end}}
|
|
6176
6178
|
{{if (index .Labels "metric")}}metric:{{index .Labels "metric"}}{{end}}
|
|
@@ -6192,12 +6194,15 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6192
6194
|
{{if (index .Labels "mode")}}mode:{{index .Labels "mode"}}{{end}}
|
|
6193
6195
|
{{if (index .Labels "runbook_url")}}runbook_url:{{toHtml (index .Labels "runbook_url")}}{{end}}
|
|
6194
6196
|
\`\`\`
|
|
6197
|
+
</div>
|
|
6198
|
+
|
|
6199
|
+
<div class="dingtalk_app hide">
|
|
6195
6200
|
|
|
6196
6201
|
## Dingtalk App
|
|
6197
6202
|
---
|
|
6198
|
-
You need to configure \`Integration Center
|
|
6203
|
+
You need to configure \`Integration Center-Instant Message-Dingtalk\` integration first to send message cards. If custom content is not set, the system default template will be used, rendering all label information:
|
|
6199
6204
|
|
|
6200
|
-
\`\`\`
|
|
6205
|
+
\`\`\`go
|
|
6201
6206
|
{{if .Description}}**description** :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6202
6207
|
{{if .Labels.resource}}**resource** : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6203
6208
|
{{range $k, $v := .Labels}}
|
|
@@ -6205,15 +6210,15 @@ You need to configure \`Integration Center - IM - Dingtalk\` integration first t
|
|
|
6205
6210
|
\`\`\`
|
|
6206
6211
|
|
|
6207
6212
|
As shown below:
|
|
6208
|
-
<img src="https://download.flashcat.cloud/flashduty/doc/en/fd/template-ding-1.png" width="800">
|
|
6209
6213
|
|
|
6214
|
+
<img src="https://download.flashcat.cloud/flashduty/changelog/20230720/dingtalk_app_render.png" alt="drawing" style="display: block; margin: 0 auto;" width="500"/>
|
|
6210
6215
|
|
|
6211
|
-
If you want to display only key label information, you can refer to the code
|
|
6216
|
+
If you want to display only key label information, you can refer to the code segment below:
|
|
6212
6217
|
|
|
6213
|
-
- We've listed some common labels
|
|
6214
|
-
- In Dingtalk app, the system will automatically remove empty lines (
|
|
6218
|
+
- We've listed some common labels, you can add or remove as needed
|
|
6219
|
+
- In Dingtalk app, the system will automatically remove empty rendered lines (due to non-existent labels), so you can configure freely
|
|
6215
6220
|
|
|
6216
|
-
\`\`\`
|
|
6221
|
+
\`\`\`go
|
|
6217
6222
|
{{if (index .Labels "resource")}}**resource**:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6218
6223
|
{{if (index .Labels "metric")}}**metric**:{{index .Labels "metric"}}{{end}}
|
|
6219
6224
|
{{if (index .Labels "prom_ql")}}**prom_ql**:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
@@ -6234,15 +6239,19 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6234
6239
|
{{if (index .Labels "mode")}}**mode**:{{index .Labels "mode"}}{{end}}
|
|
6235
6240
|
{{if (index .Labels "runbook_url")}}**runbook_url**:{{index .Labels "runbook_url"}}{{end}}
|
|
6236
6241
|
\`\`\`
|
|
6242
|
+
</div>
|
|
6243
|
+
|
|
6244
|
+
<div class="wecom_app hide">
|
|
6237
6245
|
|
|
6238
6246
|
## WeCom App
|
|
6239
6247
|
---
|
|
6240
|
-
You need to configure \`Integration Center - IM - WeCom\` integration first to send message cards. If custom content is not set, the system default template will be used to render only common label information:
|
|
6241
6248
|
|
|
6242
|
-
-
|
|
6243
|
-
- In WeCom app, the system will automatically remove empty lines (caused by non-existent labels) during rendering, so you can configure freely
|
|
6249
|
+
You need to configure \`Integration Center-Instant Message-WeCom\` integration first to send message cards. If custom content is not set, the system default template will be used, rendering only common label information:
|
|
6244
6250
|
|
|
6245
|
-
|
|
6251
|
+
- We've listed some common labels, you can add or remove as needed
|
|
6252
|
+
- In WeCom app, the system will automatically remove empty rendered lines (due to non-existent labels), so you can configure freely
|
|
6253
|
+
|
|
6254
|
+
\`\`\`go
|
|
6246
6255
|
{{if (index .Labels "resource")}}resource:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6247
6256
|
{{if (index .Labels "metric")}}metric:{{index .Labels "metric"}}{{end}}
|
|
6248
6257
|
{{if (index .Labels "prom_ql")}}prom_ql:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
@@ -6266,16 +6275,19 @@ You need to configure \`Integration Center - IM - WeCom\` integration first to s
|
|
|
6266
6275
|
|
|
6267
6276
|
As shown below:
|
|
6268
6277
|
|
|
6269
|
-
<img src="https://download.flashcat.cloud/flashduty/
|
|
6278
|
+
<img src="https://download.flashcat.cloud/flashduty/changelog/20230720/wecom_app_render.png" alt="drawing" style="display: block; margin: 0 auto;" width="500"/>
|
|
6270
6279
|
|
|
6280
|
+
**Note: WeCom limits card length. In the template rendering area, you can render no more than 8 lines of content. Content beyond 8 lines will be hidden**
|
|
6271
6281
|
|
|
6272
|
-
|
|
6282
|
+
</div>
|
|
6283
|
+
|
|
6284
|
+
<div class="slack_app hide">
|
|
6273
6285
|
|
|
6274
6286
|
## Slack App
|
|
6275
6287
|
---
|
|
6276
|
-
You need to configure \`Integration Center
|
|
6288
|
+
You need to configure \`Integration Center-Instant Message-Slack\` integration first to send message cards. If custom content is not set, the system default template will be used, rendering only common label information:
|
|
6277
6289
|
|
|
6278
|
-
\`\`\`
|
|
6290
|
+
\`\`\`go
|
|
6279
6291
|
{{if .Description}}*description* :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6280
6292
|
{{if .Labels.resource}}*resource* : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6281
6293
|
{{range $k, $v := .Labels}}
|
|
@@ -6286,18 +6298,18 @@ As shown below:
|
|
|
6286
6298
|
|
|
6287
6299
|
<img src="https://download.flashcat.cloud/flashduty/integration/slack/slack_app_message.png" alt="drawing" style="display: block; margin: 0 auto;" width="600"/>
|
|
6288
6300
|
|
|
6289
|
-
If you want to display only key label information, you can refer to the code
|
|
6301
|
+
If you want to display only key label information, you can refer to the code segment below:
|
|
6290
6302
|
|
|
6291
|
-
- We've listed some common labels
|
|
6292
|
-
- Messages can be around 15000 characters long, content beyond
|
|
6293
|
-
- In Slack app, the system will automatically remove empty lines (
|
|
6303
|
+
- We've listed some common labels, you can add or remove as needed
|
|
6304
|
+
- Messages can be around 15000 characters long, content beyond this will be truncated
|
|
6305
|
+
- In Slack app, the system will automatically remove empty rendered lines (due to non-existent labels), so you can configure freely
|
|
6294
6306
|
|
|
6295
|
-
\`\`\`
|
|
6307
|
+
\`\`\`go
|
|
6296
6308
|
{{if (index .Labels "resource")}}*resource*:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6297
6309
|
{{if (index .Labels "metric")}}*metric*:{{index .Labels "metric"}}{{end}}
|
|
6298
6310
|
{{if (index .Labels "prom_ql")}}*prom_ql*:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
6299
6311
|
{{if (index .Labels "trigger_value")}}*trigger_value*:{{index .Labels "trigger_value"}}{{end}}
|
|
6300
|
-
{{if (index .Labels "host_ql")}}*host_ql*:{{
|
|
6312
|
+
{{if (index .Labels "host_ql")}}*host_ql*:{{index .Labels "host_ql"}}{{end}}
|
|
6301
6313
|
{{if (index .Labels "region")}}*region*:{{index .Labels "region"}}{{end}}
|
|
6302
6314
|
{{if (index .Labels "cluster")}}*cluster*:{{index .Labels "cluster"}}{{end}}
|
|
6303
6315
|
{{if (index .Labels "business")}}*business*:{{index .Labels "business"}}{{end}}
|
|
@@ -6312,16 +6324,392 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6312
6324
|
{{if (index .Labels "name")}}*name*:{{index .Labels "name"}}{{end}}
|
|
6313
6325
|
{{if (index .Labels "mode")}}*mode*:{{index .Labels "mode"}}{{end}}
|
|
6314
6326
|
{{if (index .Labels "runbook_url")}}*runbook_url*:{{index .Labels "runbook_url"}}{{end}}
|
|
6315
|
-
\`\`\`
|
|
6327
|
+
\`\`\`
|
|
6328
|
+
</div>
|
|
6316
6329
|
|
|
6317
|
-
|
|
6330
|
+
<div class="teams_app hide">
|
|
6331
|
+
|
|
6332
|
+
## Microsoft Teams App
|
|
6333
|
+
---
|
|
6334
|
+
You need to configure \`Integration Center-Instant Message-Microsoft Teams\` integration first to send message cards. If custom content is not set, the system default template will be used, rendering only common label information:
|
|
6335
|
+
|
|
6336
|
+
\`\`\`
|
|
6337
|
+
{{if .Description}}**description** :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6338
|
+
{{if .Labels.resource}}**resource** : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6339
|
+
{{range $k, $v := .Labels}}
|
|
6340
|
+
{{if not (in $k "resource" "body_text" "body_text_with_table")}}**{{$k}}** : {{toHtml $v}}{{end}}{{end}}
|
|
6341
|
+
\`\`\`
|
|
6342
|
+
|
|
6343
|
+
As shown below:
|
|
6344
|
+
|
|
6345
|
+
<img src="https://download.flashcat.cloud/flashduty/integration/microsoft-teams/teams_app_message.png" alt="drawing" style="display: block; margin: 0 auto;" width="300"/>
|
|
6346
|
+
|
|
6347
|
+
If you want to display only key label information, you can refer to the code segment below:
|
|
6348
|
+
|
|
6349
|
+
- We've listed some common labels, you can add or remove as needed
|
|
6350
|
+
- Messages can be around 28KB in size, content beyond this will result in an error
|
|
6351
|
+
- In Microsoft Teams app, the system will automatically remove empty rendered lines (due to non-existent labels), so you can configure freely
|
|
6352
|
+
|
|
6353
|
+
\`\`\`
|
|
6354
|
+
{{if (index .Labels "resource")}}**resource**:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6355
|
+
{{if (index .Labels "metric")}}**metric**:{{index .Labels "metric"}}{{end}}
|
|
6356
|
+
{{if (index .Labels "prom_ql")}}**prom_ql**:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
6357
|
+
{{if (index .Labels "trigger_value")}}**trigger_value**:{{index .Labels "trigger_value"}}{{end}}
|
|
6358
|
+
{{if (index .Labels "host_ql")}}**host_ql**:{{index .Labels "host_ql"}}{{end}}
|
|
6359
|
+
{{if (index .Labels "region")}}**region**:{{index .Labels "region"}}{{end}}
|
|
6360
|
+
{{if (index .Labels "cluster")}}**cluster**:{{index .Labels "cluster"}}{{end}}
|
|
6361
|
+
{{if (index .Labels "business")}}**business**:{{index .Labels "business"}}{{end}}
|
|
6362
|
+
{{if (index .Labels "service")}}**service**:{{index .Labels "service"}}{{end}}
|
|
6363
|
+
{{if (index .Labels "env")}}**env**:{{index .Labels "env"}}{{end}}
|
|
6364
|
+
{{if (index .Labels "type")}}**type**:{{index .Labels "type"}}{{end}}
|
|
6365
|
+
{{if (index .Labels "topic")}}**topic**:{{index .Labels "topic"}}{{end}}
|
|
6366
|
+
{{if (index .Labels "cpu")}}**cpu**:{{index .Labels "cpu"}}{{end}}
|
|
6367
|
+
{{if (index .Labels "device")}}**device**:{{index .Labels "device"}}{{end}}
|
|
6368
|
+
{{if (index .Labels "path")}}**path**:{{index .Labels "path"}}{{end}}
|
|
6369
|
+
{{if (index .Labels "fstype")}}**fstype**:{{index .Labels "fstype"}}{{end}}
|
|
6370
|
+
{{if (index .Labels "name")}}**name**:{{index .Labels "name"}}{{end}}
|
|
6371
|
+
{{if (index .Labels "mode")}}**mode**:{{index .Labels "mode"}}{{end}}
|
|
6372
|
+
{{if (index .Labels "runbook_url")}}**runbook_url**:{{index .Labels "runbook_url"}}{{end}}
|
|
6373
|
+
\`\`\`
|
|
6374
|
+
</div>
|
|
6375
|
+
|
|
6376
|
+
<div class="sms hide">
|
|
6377
|
+
|
|
6378
|
+
## Feishu/Lark Bot
|
|
6379
|
+
---
|
|
6380
|
+
Feishu/Lark bot supports message cards, rich text, and plain text formats. The default template is in message card format.
|
|
6381
|
+
|
|
6382
|
+
- The msg_type field is required for message cards and rich text, otherwise it will be sent as plain text format
|
|
6383
|
+
- The maximum message length is \`4000 bytes, content exceeding this limit will be truncated\`
|
|
6384
|
+
- If no custom content is set, the system default template will be used to display key information:
|
|
6385
|
+
|
|
6386
|
+
1. Message Card
|
|
6387
|
+
msg_type is required, value should be interactive
|
|
6388
|
+
\`\`\`
|
|
6389
|
+
{
|
|
6390
|
+
"msg_type": "interactive",
|
|
6391
|
+
"card": {
|
|
6392
|
+
"config": {
|
|
6393
|
+
"wide_screen_mode": true,
|
|
6394
|
+
"enable_forward": true
|
|
6395
|
+
},
|
|
6396
|
+
"header": {
|
|
6397
|
+
"template": "{{if eq .IncidentSeverity "Critical"}}red{{else if eq .IncidentSeverity "Warning"}}orange{{else}}yellow{{end}}",
|
|
6398
|
+
"title": {
|
|
6399
|
+
"content": "{{fireReason .}}INC #{{.Num}} {{toHtml .Title}}",
|
|
6400
|
+
"tag": "plain_text"
|
|
6401
|
+
}
|
|
6402
|
+
},
|
|
6403
|
+
"elements": [{
|
|
6404
|
+
"tag": "div",
|
|
6405
|
+
"fields": [{
|
|
6406
|
+
"text": {
|
|
6407
|
+
"tag": "lark_md",
|
|
6408
|
+
"content": "**🏢 Channel:**{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}"
|
|
6409
|
+
}
|
|
6410
|
+
},
|
|
6411
|
+
{
|
|
6412
|
+
"text": {
|
|
6413
|
+
"tag": "lark_md",
|
|
6414
|
+
"content": "**{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}⚠️{{else}}ℹ️{{end}} Severity:**{{.IncidentSeverity}}"
|
|
6415
|
+
}
|
|
6416
|
+
},
|
|
6417
|
+
{
|
|
6418
|
+
"text": {
|
|
6419
|
+
"tag": "lark_md",
|
|
6420
|
+
"content": "**⏰ Triggered at:**{{date "2006-01-02 15:04:05" .StartTime}}{{if gt .AlertCnt 1}}"
|
|
6421
|
+
}
|
|
6422
|
+
},
|
|
6423
|
+
{
|
|
6424
|
+
"text": {
|
|
6425
|
+
"tag": "lark_md",
|
|
6426
|
+
"content": "**🔔 Grouped alerts:**{{.AlertCnt}} {{end}}{{if .Labels.resource}}"
|
|
6427
|
+
}
|
|
6428
|
+
},
|
|
6429
|
+
{
|
|
6430
|
+
"tag": "div",
|
|
6431
|
+
"text": {
|
|
6432
|
+
"tag": "lark_md",
|
|
6433
|
+
"content": "**📌 Alert targets:**{{toHtml (joinAlertLabels . "resource" ",")}} {{end}}{{if .Description}}"
|
|
6434
|
+
}
|
|
6435
|
+
},
|
|
6436
|
+
{
|
|
6437
|
+
"tag": "div",
|
|
6438
|
+
"text": {
|
|
6439
|
+
"tag": "lark_md",
|
|
6440
|
+
"content": "**🔍 Description:**{{.Description}}{{end}}{{if gt (len .Responders) 0}}"
|
|
6441
|
+
}
|
|
6442
|
+
},
|
|
6443
|
+
{
|
|
6444
|
+
"tag": "div",
|
|
6445
|
+
"text": {
|
|
6446
|
+
"tag": "lark_md",
|
|
6447
|
+
"content": "**👨💻 Responders:**{{range .Responders}}@{{.PersonName}} {{end}}{{end}}"
|
|
6448
|
+
}
|
|
6449
|
+
}
|
|
6450
|
+
]
|
|
6451
|
+
},
|
|
6452
|
+
{
|
|
6453
|
+
"tag": "hr"
|
|
6454
|
+
},
|
|
6455
|
+
{
|
|
6456
|
+
"tag": "action",
|
|
6457
|
+
"actions": [{
|
|
6458
|
+
"tag": "button",
|
|
6459
|
+
"text": {
|
|
6460
|
+
"tag": "plain_text",
|
|
6461
|
+
"content": "Details"
|
|
6462
|
+
},
|
|
6463
|
+
"type": "primary",
|
|
6464
|
+
"url": "{{.DetailUrl}}"
|
|
6465
|
+
},
|
|
6466
|
+
{
|
|
6467
|
+
"tag": "button",
|
|
6468
|
+
"text": {
|
|
6469
|
+
"tag": "plain_text",
|
|
6470
|
+
"content": "Acknowledge"
|
|
6471
|
+
},
|
|
6472
|
+
"type": "primary",
|
|
6473
|
+
"url": "{{.DetailUrl}}?ack=1"
|
|
6474
|
+
}
|
|
6475
|
+
]
|
|
6476
|
+
}]
|
|
6477
|
+
}
|
|
6478
|
+
}
|
|
6479
|
+
\`\`\`
|
|
6480
|
+
|
|
6481
|
+
2. Rich Text
|
|
6482
|
+
msg_type is required, value should be post
|
|
6483
|
+
\`\`\`
|
|
6484
|
+
{
|
|
6485
|
+
"msg_type": "post",
|
|
6486
|
+
"post": {
|
|
6487
|
+
"zh_cn": {
|
|
6488
|
+
"title": "{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}⚠️{{else}}ℹ️{{end}} {{fireReason .}}INC #{{.Num}} {{toHtml .Title}}",
|
|
6489
|
+
"content": [
|
|
6490
|
+
[{
|
|
6491
|
+
"tag": "text",
|
|
6492
|
+
"text": "🏢 "
|
|
6493
|
+
}, {
|
|
6494
|
+
"tag": "text",
|
|
6495
|
+
"text": "Channel:",
|
|
6496
|
+
"text_type": "bold"
|
|
6497
|
+
}, {
|
|
6498
|
+
"tag": "text",
|
|
6499
|
+
"text": "{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}\\n"
|
|
6500
|
+
}],
|
|
6501
|
+
[{
|
|
6502
|
+
"tag": "text",
|
|
6503
|
+
"text": "{{if eq .IncidentSeverity "Critical"}}🔴{{else if eq .IncidentSeverity "Warning"}}⚠️{{else}}ℹ️{{end}} "
|
|
6504
|
+
}, {
|
|
6505
|
+
"tag": "text",
|
|
6506
|
+
"text": "Severity:",
|
|
6507
|
+
"text_type": "bold"
|
|
6508
|
+
}, {
|
|
6509
|
+
"tag": "text",
|
|
6510
|
+
"text": "{{.IncidentSeverity}}\\n",
|
|
6511
|
+
"text_type": "{{if eq .IncidentSeverity "Critical"}}bold{{end}}"
|
|
6512
|
+
}],
|
|
6513
|
+
[{
|
|
6514
|
+
"tag": "text",
|
|
6515
|
+
"text": "⏰ "
|
|
6516
|
+
}, {
|
|
6517
|
+
"tag": "text",
|
|
6518
|
+
"text": "Triggered at:",
|
|
6519
|
+
"text_type": "bold"
|
|
6520
|
+
}, {
|
|
6521
|
+
"tag": "text",
|
|
6522
|
+
"text": "{{date "2006-01-02 15:04:05" .StartTime}}\\n"
|
|
6523
|
+
}],
|
|
6524
|
+
{{if gt .AlertCnt 1}}[{
|
|
6525
|
+
"tag": "text",
|
|
6526
|
+
"text": "🔔 "
|
|
6527
|
+
}, {
|
|
6528
|
+
"tag": "text",
|
|
6529
|
+
"text": "Grouped alerts:",
|
|
6530
|
+
"text_type": "bold"
|
|
6531
|
+
}, {
|
|
6532
|
+
"tag": "text",
|
|
6533
|
+
"text": "{{.AlertCnt}}\\n"
|
|
6534
|
+
}],{{end}}
|
|
6535
|
+
{{if .Labels.resource}}[{
|
|
6536
|
+
"tag": "text",
|
|
6537
|
+
"text": "📋 "
|
|
6538
|
+
}, {
|
|
6539
|
+
"tag": "text",
|
|
6540
|
+
"text": "Alert targets:",
|
|
6541
|
+
"text_type": "bold"
|
|
6542
|
+
}, {
|
|
6543
|
+
"tag": "text",
|
|
6544
|
+
"text": "{{toHtml (joinAlertLabels . "resource" ", ")}}\\n"
|
|
6545
|
+
}],{{end}}
|
|
6546
|
+
{{if .Description}}[{
|
|
6547
|
+
"tag": "text",
|
|
6548
|
+
"text": "📝 "
|
|
6549
|
+
}, {
|
|
6550
|
+
"tag": "text",
|
|
6551
|
+
"text": "Description:",
|
|
6552
|
+
"text_type": "bold"
|
|
6553
|
+
}, {
|
|
6554
|
+
"tag": "text",
|
|
6555
|
+
"text": "{{toHtml .Description}}\\n"
|
|
6556
|
+
}],{{end}}
|
|
6557
|
+
{{if gt (len .Responders) 0}}[{
|
|
6558
|
+
"tag": "text",
|
|
6559
|
+
"text": "👨💻 "
|
|
6560
|
+
}, {
|
|
6561
|
+
"tag": "text",
|
|
6562
|
+
"text": "Responders:",
|
|
6563
|
+
"text_type": "bold"
|
|
6564
|
+
}, {
|
|
6565
|
+
"tag": "text",
|
|
6566
|
+
"text": "{{range .Responders}}@{{.PersonName}} {{end}}\\n"
|
|
6567
|
+
}],{{end}}
|
|
6568
|
+
[{
|
|
6569
|
+
"tag": "a",
|
|
6570
|
+
"href": "{{.DetailUrl}}",
|
|
6571
|
+
"text": "Details"
|
|
6572
|
+
},{
|
|
6573
|
+
"tag": "text",
|
|
6574
|
+
"text": " "
|
|
6575
|
+
},{
|
|
6576
|
+
"tag": "a",
|
|
6577
|
+
"href": "{{.DetailUrl}}?ack=1",
|
|
6578
|
+
"text": "Acknowledge"
|
|
6579
|
+
}]
|
|
6580
|
+
]
|
|
6581
|
+
}
|
|
6582
|
+
}
|
|
6583
|
+
}
|
|
6584
|
+
\`\`\`
|
|
6585
|
+
|
|
6586
|
+
3. Plain Text
|
|
6587
|
+
\`\`\`
|
|
6588
|
+
{{fireReason .}}INC #{{.Num}} {{toHtml .Title}}
|
|
6589
|
+
-----
|
|
6590
|
+
Channel:{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}
|
|
6591
|
+
Severity:{{.IncidentSeverity}}
|
|
6592
|
+
Triggered at:{{date "2006-01-02 15:04:05" .StartTime}}
|
|
6593
|
+
Duration:{{ago .StartTime}}{{if gt .AlertCnt 1}}
|
|
6594
|
+
Grouped alerts:{{.AlertCnt}}{{end}}{{if .Labels.resource}}
|
|
6595
|
+
Alert targets:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}{{if .Description}}
|
|
6596
|
+
Description:{{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}
|
|
6597
|
+
Responders:{{range .Responders}}@{{.PersonName}} {{end}}{{end}}
|
|
6598
|
+
<br>Details:{{.DetailUrl}}
|
|
6599
|
+
\`\`\`
|
|
6600
|
+
</div>
|
|
6601
|
+
|
|
6602
|
+
<div class="dingtalk hide">
|
|
6603
|
+
|
|
6604
|
+
## Dingtalk Bot
|
|
6605
|
+
---
|
|
6606
|
+
Dingtalk bot only supports sending Markdown messages ([syntax restrictions](https://open.dingtalk.com/document/robots/custom-robot-access#title-7ur-3ok-s1a)).
|
|
6607
|
+
|
|
6608
|
+
- The maximum message length is \`4000 bytes, content exceeding this limit will be truncated\`
|
|
6609
|
+
- If the text contains \`<br>\`, when rendering, the system will \`first remove empty lines, then replace <br> with line breaks\`
|
|
6610
|
+
- If no custom content is set, the system default template will be used to display key information:
|
|
6611
|
+
|
|
6612
|
+
\`\`\`
|
|
6613
|
+
{{fireReason .}}INC [#{{.Num}}]({{.DetailUrl}}) {{toHtml .Title}}
|
|
6614
|
+
|
|
6615
|
+
---
|
|
6616
|
+
- Channel: {{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}
|
|
6617
|
+
- Severity: {{$s := colorSeverity .IncidentSeverity}}{{toHtml $s}}
|
|
6618
|
+
- Triggered at: {{date "2006-01-02 15:04:05" .StartTime}}
|
|
6619
|
+
- Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}
|
|
6620
|
+
- Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}
|
|
6621
|
+
- Alert targets: {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}{{if .Description}}
|
|
6622
|
+
- Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}
|
|
6623
|
+
- Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}
|
|
6624
|
+
---
|
|
6625
|
+
<br>[Details]({{.DetailUrl}})|[Acknowledge]({{.DetailUrl}}?ack=1)
|
|
6626
|
+
\`\`\`
|
|
6627
|
+
</div>
|
|
6628
|
+
|
|
6629
|
+
<div class="wecom hide">
|
|
6630
|
+
|
|
6631
|
+
## WeCom Bot
|
|
6632
|
+
---
|
|
6633
|
+
WeCom bot only supports sending Markdown messages ([syntax restrictions](https://developer.work.weixin.qq.com/document/path/91770#markdown%E7%B1%BB%E5%9E%8B)).
|
|
6634
|
+
|
|
6635
|
+
- The maximum message length is \`4000 bytes, content exceeding this limit will be truncated\`
|
|
6636
|
+
- If the text contains \`<br>\`, when rendering, the system will \`first remove empty lines, then replace <br> with line breaks\`
|
|
6637
|
+
- If no custom content is set, the system default template will be used to display key information:
|
|
6638
|
+
|
|
6639
|
+
\`\`\`
|
|
6640
|
+
{{fireReason .}}**INC [#{{.Num}}]({{.DetailUrl}}) {{toHtml .Title}}**
|
|
6641
|
+
> Channel: <font color="warning">{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}</font>
|
|
6642
|
+
> Severity: <font color="warning">{{.IncidentSeverity}}</font>
|
|
6643
|
+
> Triggered at: {{date "2006-01-02 15:04:05" .StartTime}}
|
|
6644
|
+
> Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}
|
|
6645
|
+
> Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}
|
|
6646
|
+
> Alert targets: {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}{{if .Description}}
|
|
6647
|
+
> Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}
|
|
6648
|
+
> Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}
|
|
6649
|
+
<br>[Details]({{.DetailUrl}})|[Acknowledge]({{.DetailUrl}}?ack=1)
|
|
6650
|
+
\`\`\`
|
|
6651
|
+
</div>
|
|
6652
|
+
|
|
6653
|
+
<div class="telegram hide">
|
|
6654
|
+
|
|
6655
|
+
## Telegram Bot
|
|
6318
6656
|
---
|
|
6319
|
-
- Messages \`can be around 4000 characters long, content beyond that will be truncated\`
|
|
6320
|
-
- If text contains \`<br>\`, during rendering the system will \`first remove empty lines, then replace <br> with newline\`
|
|
6321
|
-
- Message format \`follows Zoom message format\`. Current bot application doesn't support Markdown, refer to official website for other formats: https://developers.zoom.us/docs/team-chat-apps/customizing-messages/
|
|
6322
|
-
- If custom content is not set, the system default template will be used to display only key information:
|
|
6323
6657
|
|
|
6658
|
+
- Configure a Telegram service address accessible in mainland China
|
|
6659
|
+
- The maximum message length is \`4096 characters, content exceeding this limit will not be sent\`
|
|
6660
|
+
- If the text contains \`<br>\`, when rendering, the system will \`first remove empty lines, then replace <br> with line breaks\`
|
|
6661
|
+
- If no custom content is set, the system default template will be used to display key information:
|
|
6662
|
+
|
|
6663
|
+
\`\`\`
|
|
6664
|
+
{{fireReason .}}INC [#{{.Num}}]({{.DetailUrl}}) {{toHtml .Title}}
|
|
6665
|
+
-----
|
|
6666
|
+
Channel: {{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}
|
|
6667
|
+
Severity: {{.IncidentSeverity}}
|
|
6668
|
+
Triggered at: {{date "2006-01-02 15:04:05" .StartTime}}
|
|
6669
|
+
Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}
|
|
6670
|
+
Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}
|
|
6671
|
+
Alert targets: {{toHtml (joinAlertLabels . "resource" ", ")}}({{.Labels.resource}}){{end}}{{if .Description}}
|
|
6672
|
+
Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}
|
|
6673
|
+
Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}
|
|
6674
|
+
|
|
6675
|
+
<br>[Details]({{.DetailUrl}})|[Acknowledge]({{.DetailUrl}}?ack=1)
|
|
6676
|
+
\`\`\`
|
|
6677
|
+
</div>
|
|
6678
|
+
|
|
6679
|
+
<div class="slack hide">
|
|
6680
|
+
|
|
6681
|
+
## Slack Bot
|
|
6682
|
+
---
|
|
6683
|
+
- Messages can be \`approximately 15000 characters long, content exceeding this limit will be truncated\`
|
|
6684
|
+
- If the text contains \`<br>\`, when rendering, the system will \`first remove empty lines, then replace <br> with line breaks\`
|
|
6685
|
+
- If no custom content is set, the system default template will be used to display key information:
|
|
6686
|
+
|
|
6687
|
+
\`\`\`
|
|
6688
|
+
{{fireReason .}}INC <{{.DetailUrl}}|#{{.Num}}> {{toHtml .Title}}
|
|
6689
|
+
-----
|
|
6690
|
+
Channel: {{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}
|
|
6691
|
+
Severity: {{.IncidentSeverity}}
|
|
6692
|
+
Triggered at: {{date "2006-01-02 15:04:05" .StartTime}}
|
|
6693
|
+
Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}
|
|
6694
|
+
Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}
|
|
6695
|
+
Alert targets: {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}{{if .Description}}
|
|
6696
|
+
Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}
|
|
6697
|
+
Responders: {{range .Responders}}@{{.PersonName}} {{end}}{{end}}
|
|
6698
|
+
-----
|
|
6699
|
+
<br><{{.DetailUrl}}|Details>|<{{.DetailUrl}}?ack=1|Acknowledge>
|
|
6324
6700
|
\`\`\`
|
|
6701
|
+
</div>
|
|
6702
|
+
|
|
6703
|
+
<div class="zoom hide">
|
|
6704
|
+
|
|
6705
|
+
## Zoom Bot
|
|
6706
|
+
---
|
|
6707
|
+
- Messages can be \`approximately 4000 characters long, content exceeding this limit will be truncated\`
|
|
6708
|
+
- If the text contains \`<br>\`, when rendering, the system will \`first remove empty lines, then replace <br> with line breaks\`
|
|
6709
|
+
- Message format \`follows Zoom message format\`. The current bot application doesn't support Markdown. For other formats, please refer to the official documentation: https://developers.zoom.us/docs/team-chat-apps/customizing-messages/
|
|
6710
|
+
- If no custom content is set, the system default template will be used to display key information:
|
|
6711
|
+
|
|
6712
|
+
\`\`\`json
|
|
6325
6713
|
{"head": {
|
|
6326
6714
|
"text": "{{fireReason .}}INC [#{{.Num}}] {{toHtml .Title}}",
|
|
6327
6715
|
"style": {
|
|
@@ -6333,7 +6721,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6333
6721
|
"body": [
|
|
6334
6722
|
{
|
|
6335
6723
|
"type": "message",
|
|
6336
|
-
"text": "Channel
|
|
6724
|
+
"text": "Channel: {{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}",
|
|
6337
6725
|
"style": {
|
|
6338
6726
|
"bold": false,
|
|
6339
6727
|
"italic": false
|
|
@@ -6341,7 +6729,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6341
6729
|
},
|
|
6342
6730
|
{
|
|
6343
6731
|
"type": "message",
|
|
6344
|
-
"text": "Severity
|
|
6732
|
+
"text": "Severity: {{.IncidentSeverity}}",
|
|
6345
6733
|
"style": {
|
|
6346
6734
|
"bold": false,
|
|
6347
6735
|
"italic": false,
|
|
@@ -6350,7 +6738,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6350
6738
|
},
|
|
6351
6739
|
{
|
|
6352
6740
|
"type": "message",
|
|
6353
|
-
"text": "Duration
|
|
6741
|
+
"text": "Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}",
|
|
6354
6742
|
"style": {
|
|
6355
6743
|
"bold": false,
|
|
6356
6744
|
"italic": false
|
|
@@ -6358,7 +6746,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6358
6746
|
},
|
|
6359
6747
|
{
|
|
6360
6748
|
"type": "message",
|
|
6361
|
-
"text": "Grouped alerts
|
|
6749
|
+
"text": "Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}",
|
|
6362
6750
|
"style": {
|
|
6363
6751
|
"bold": false,
|
|
6364
6752
|
"italic": false
|
|
@@ -6366,7 +6754,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6366
6754
|
},
|
|
6367
6755
|
{
|
|
6368
6756
|
"type": "message",
|
|
6369
|
-
"text": "
|
|
6757
|
+
"text": "Alert targets: {{.Labels.resource}}{{end}}{{if .Description}}",
|
|
6370
6758
|
"style": {
|
|
6371
6759
|
"bold": false,
|
|
6372
6760
|
"italic": false
|
|
@@ -6374,7 +6762,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6374
6762
|
},
|
|
6375
6763
|
{
|
|
6376
6764
|
"type": "message",
|
|
6377
|
-
"text": "Description
|
|
6765
|
+
"text": "Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}",
|
|
6378
6766
|
"style": {
|
|
6379
6767
|
"bold": false,
|
|
6380
6768
|
"italic": false
|
|
@@ -6382,7 +6770,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6382
6770
|
},
|
|
6383
6771
|
{
|
|
6384
6772
|
"type": "message",
|
|
6385
|
-
"text": "Responders
|
|
6773
|
+
"text": "Responders: {{range .Responders}}@{{.PersonName}}{{end}}{{end}}",
|
|
6386
6774
|
"style": {
|
|
6387
6775
|
"bold": false,
|
|
6388
6776
|
"italic": false
|
|
@@ -6390,12 +6778,12 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6390
6778
|
},
|
|
6391
6779
|
{
|
|
6392
6780
|
"type": "message",
|
|
6393
|
-
"text": "View
|
|
6781
|
+
"text": "View Details",
|
|
6394
6782
|
"link": "{{.DetailUrl}}{{if .IsFlapping}}"
|
|
6395
6783
|
},
|
|
6396
6784
|
{
|
|
6397
6785
|
"type": "message",
|
|
6398
|
-
"text": "Note:
|
|
6786
|
+
"text": "Note: The current incident status is changing frequently. Notifications will be suppressed for {{.Flapping.MuteMinutes}} minutes. Please optimize your alert policy.{{end}}{{if .IsInStorm}}",
|
|
6399
6787
|
"style": {
|
|
6400
6788
|
"bold": true,
|
|
6401
6789
|
"italic": false
|
|
@@ -6403,7 +6791,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6403
6791
|
},
|
|
6404
6792
|
{
|
|
6405
6793
|
"type": "message",
|
|
6406
|
-
"text": "Note:
|
|
6794
|
+
"text": "Note: The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm. Please handle with urgency!{{end}}",
|
|
6407
6795
|
"style": {
|
|
6408
6796
|
"bold": true,
|
|
6409
6797
|
"italic": false
|
|
@@ -6412,108 +6800,115 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6412
6800
|
]
|
|
6413
6801
|
}
|
|
6414
6802
|
\`\`\`
|
|
6803
|
+
</div>
|
|
6804
|
+
|
|
6805
|
+
<div class="sms hide">
|
|
6415
6806
|
|
|
6416
6807
|
## SMS
|
|
6417
6808
|
---
|
|
6418
|
-
If custom content is
|
|
6809
|
+
If no custom content is set, the system default template will be used for notifications:
|
|
6419
6810
|
|
|
6420
|
-
\`\`\`
|
|
6811
|
+
\`\`\`go
|
|
6421
6812
|
You have a pending incident: {{toHtml .Title}}, Channel: {{.ChannelName}}, Severity: {{.IncidentSeverity}}{{if gt .AlertCnt 1}}, Grouped {{.AlertCnt}} alerts{{end}}
|
|
6422
6813
|
\`\`\`
|
|
6814
|
+
</div>
|
|
6815
|
+
|
|
6816
|
+
<div class="email hide">
|
|
6423
6817
|
|
|
6424
6818
|
## Email
|
|
6425
6819
|
---
|
|
6426
|
-
If custom content is
|
|
6820
|
+
If no custom content is set, the system default template will be used for notifications:
|
|
6427
6821
|
|
|
6428
|
-
\`\`\`
|
|
6822
|
+
\`\`\`html
|
|
6429
6823
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
6430
6824
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
6431
6825
|
<title>{{.Title}}</title>
|
|
6432
6826
|
<html lang="en">
|
|
6433
6827
|
|
|
6434
6828
|
<head data-id="__react-email-head">
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6829
|
+
<style>
|
|
6830
|
+
.bg-Critical { background-color: #C80000; }
|
|
6831
|
+
.bg-Warning { background-color: #FA7D00; }
|
|
6832
|
+
.bg-Info { background-color: #FABE00; }
|
|
6833
|
+
.bg-Ok { background-color: rgb(132 204 22); }
|
|
6834
|
+
.text-Critical { color: #C80000; }
|
|
6835
|
+
.text-Warning { color: #FA7D00; }
|
|
6836
|
+
.text-Info { color: #FABE00; }
|
|
6837
|
+
.text-Ok { color: rgb(132 204 22); }
|
|
6838
|
+
.text-title {font-weight:500;width:6rem;flex-shrink:0}
|
|
6839
|
+
.text-content {color:rgb(55,65,81)}
|
|
6840
|
+
</style>
|
|
6447
6841
|
</head>
|
|
6448
6842
|
|
|
6449
6843
|
<body data-id="__react-email-body" style="background-color:rgb(255,255,255);border-radius:0.25rem;margin-top:2.5rem;margin-bottom:2.5rem;margin-left:auto;margin-right:auto;padding:1rem;min-width:400px;max-width:660px;font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji">
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6844
|
+
<div style="width:100%;height:0.375rem;margin-bottom:2rem" class="bg-{{.IncidentSeverity}}"></div>
|
|
6845
|
+
<div style="display:flex;align-items:center;margin-bottom:1.5rem">
|
|
6846
|
+
<div style="display:flex;align-items:flex-end;gap:1rem"><img witdh="120" data-id="react-email-img" src="https://console.flashcat.cloud/image/saas-logo.png" height="40" style="display:block;outline:none;border:none;text-decoration:none" /><span style="font-size:1.25rem;line-height:1.75rem;font-weight:600">You have a pending incident</span></div>
|
|
6847
|
+
</div>
|
|
6848
|
+
<div style="background-color:rgb(243,244,246);padding:2rem;margin-top:1rem;border-radius:0.5rem">
|
|
6849
|
+
<div style="display:flex;flex-direction:column;gap:0.75rem">
|
|
6850
|
+
<div style="display:flex">
|
|
6851
|
+
<div class="text-title">Title</div>
|
|
6852
|
+
<div class="text-content">{{.Title}}</div>
|
|
6853
|
+
</div>
|
|
6854
|
+
<div style="display:flex">
|
|
6855
|
+
<div class="text-title">Severity</div>
|
|
6856
|
+
<div class="text-{{.IncidentSeverity}}">{{.IncidentSeverity}}</div>
|
|
6857
|
+
</div>
|
|
6858
|
+
<div style="display:flex">
|
|
6859
|
+
<div class="text-title">Channel</div>
|
|
6860
|
+
<div class="text-content">{{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}</div>
|
|
6861
|
+
</div>
|
|
6862
|
+
<div style="display:flex">
|
|
6863
|
+
<div class="text-title">Triggered at</div>
|
|
6864
|
+
<div class="text-content">{{date "2006-01-02 15:04:05" .StartTime}}</div>
|
|
6865
|
+
</div>
|
|
6866
|
+
{{if .CreatorID}}
|
|
6867
|
+
<div style="display:flex">
|
|
6868
|
+
<div class="text-title">Creator</div>
|
|
6869
|
+
<div class="text-content">{{.Creator.PersonName}}</div>
|
|
6870
|
+
</div>
|
|
6871
|
+
{{end}}
|
|
6872
|
+
{{if gt (len .Responders) 0}}
|
|
6873
|
+
<div style="display:flex">
|
|
6874
|
+
<div class="text-title">Responders</div>
|
|
6875
|
+
<div class="text-content">{{range .Responders}}@{{.PersonName}} {{end}}</div>
|
|
6876
|
+
</div>
|
|
6877
|
+
{{end}}
|
|
6878
|
+
<div style="display:flex">
|
|
6879
|
+
<div class="text-title">Progress</div>
|
|
6880
|
+
<div class="text-content">{{.Progress}}</div>
|
|
6881
|
+
</div>
|
|
6882
|
+
<div style="display:flex">
|
|
6883
|
+
<div class="text-title">Description</div>
|
|
6884
|
+
<div style="color:rgb(55,65,81);margin-top:0.125rem">
|
|
6885
|
+
<div data-id="react-email-markdown">{{toHtml .Description}}</div>
|
|
6886
|
+
</div>
|
|
6887
|
+
</div>
|
|
6888
|
+
{{if .Labels.resource}}
|
|
6889
|
+
<div style="display:flex;margin-bottom:0.5rem;">
|
|
6890
|
+
<div style="color:#000;font-weight:500;width:6rem;margin-right:1rem;">Alert targets</div>
|
|
6891
|
+
<div style="color:rgb(55,65,81);margin-top:0.125rem">
|
|
6892
|
+
<div data-id="react-email-markdown">{{toHtml (joinAlertLabels . "resource" ", ")}}</div>
|
|
6893
|
+
</div>
|
|
6894
|
+
</div>
|
|
6895
|
+
{{end}}
|
|
6896
|
+
</div>
|
|
6897
|
+
<div style="display:flex;gap:1rem;margin-top:2rem"><a href="{{.DetailUrl}}?ack=1" data-id="react-email-button" target="_blank" style="line-height:100%;text-decoration:none;display:inline-block;max-width:100%;padding:0px 0px"><span></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:0"><div style="padding-left:2rem;padding-right:2rem;padding-top:0.5rem;padding-bottom:0.5rem;background-color:rgb(108,83,177);border-radius:0.25rem;font-size:1rem;line-height:1.5rem;color:rgb(255,255,255);font-weight:600;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms">Acknowledge</div></span><span></span></a><a href="{{.DetailUrl}}" data-id="react-email-button" target="_blank" style="color:#61dafb;line-height:100%;text-decoration:none;display:inline-block;max-width:100%;padding:0px 0px"><span></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:0"><div style="padding-left:2rem;padding-right:2rem;padding-top:0.5rem;padding-bottom:0.5rem;background-color:rgb(255,255,255);border-width: 1px;border-style:solid;border-color:rgb(229,231,235);border-radius:0.25rem;font-size:1rem;line-height:1.5rem;color:rgb(0,0,0);font-weight:600">View Details</div></span><span></span></a></div>
|
|
6898
|
+
</div>
|
|
6899
|
+
<div style="display:flex;justify-content:flex-end;align-items:flex-end;margin-top:2rem">
|
|
6900
|
+
<div style="font-size:0.875rem;line-height:1.25rem;font-weight:500">ALL RIGHTS RESERVED © Beijing Flashcat Cloud Technology Co.,Ltd.</div>
|
|
6901
|
+
</div>
|
|
6508
6902
|
</body>
|
|
6509
6903
|
|
|
6510
6904
|
</html>
|
|
6511
6905
|
\`\`\`
|
|
6512
6906
|
|
|
6513
|
-
As shown below:
|
|
6514
|
-
|
|
6907
|
+
As shown in the image below:
|
|
6908
|
+
|
|
6909
|
+
<img src="https://download.flashcat.cloud/flashduty/changelog/20230720/email_render.png" alt="drawing" style="display: block; margin: 0 auto;" width="500"/>
|
|
6515
6910
|
|
|
6516
|
-
|
|
6911
|
+
</div>`,HuaweiyunAPM:`---
|
|
6517
6912
|
title: "Huawei Cloud APM Alerts"
|
|
6518
6913
|
description: "Sync Huawei Cloud APM alerts to Flashduty through webhook to achieve automatic alert noise reduction"
|
|
6519
6914
|
date: "2024-07-05T10:00:00+08:00"
|
|
@@ -6619,4 +7014,174 @@ When you need to route alerts to different channels based on alert payload infor
|
|
|
6619
7014
|
|
|
6620
7015
|
</div>
|
|
6621
7016
|
|
|
7017
|
+
`,JiraSync:`---
|
|
7018
|
+
title: "Jira Sync"
|
|
7019
|
+
description: "Sync incidents with Jira issues through Jira Sync Webhook."
|
|
7020
|
+
date: "2024-05-11T10:00:00+08:00"
|
|
7021
|
+
url: "https://docs.flashcat.cloud/en/flashduty/jira-sync"
|
|
7022
|
+
---
|
|
7023
|
+
|
|
7024
|
+
Through Jira Sync Webhook, you can associate and synchronize Flashduty incidents with Jira Issues, enabling integration between Flashduty and Jira.
|
|
7025
|
+
|
|
7026
|
+
## Prerequisites
|
|
7027
|
+
- This integration is compatible with Jira Cloud, as well as versions 7.x and 8.x of Jira Server and Jira Data Center.
|
|
7028
|
+
- Currently, only one-way synchronization of incident information and status to Jira is supported. Information in Jira will not sync back to Flashduty.
|
|
7029
|
+
- For Jira Cloud, use an API Token in the password field during authorization configuration; for Jira Server or Data Center, use your Jira account password.
|
|
7030
|
+
|
|
7031
|
+
## Getting API Token in Jira Cloud (Jira Server and Data Center please skip)
|
|
7032
|
+
|
|
7033
|
+
- After logging into Jira Cloud, click your profile picture in the top right corner and select **Manage Account**.
|
|
7034
|
+
- On the **Manage Account** page, select the **Security** tab.
|
|
7035
|
+
- On the **Security** page, click **Create and manage API tokens**.
|
|
7036
|
+
- In the **Create and manage API tokens** dialog, enter an API token name and select an expiration time.
|
|
7037
|
+
- Click **Create** to generate the API token.
|
|
7038
|
+
- Copy the API token value and paste it into the API token field in Flashduty's authorization configuration.
|
|
7039
|
+
|
|
7040
|
+
## Configuring Integration in Flashduty
|
|
7041
|
+
|
|
7042
|
+
### 1. Create and Authenticate Jira Integration
|
|
7043
|
+
<div class="hide">
|
|
7044
|
+
|
|
7045
|
+
In the Integration Center, select **Webhook**, choose **Jira Sync** integration, and fill in the following authentication information.
|
|
7046
|
+
|
|
7047
|
+
</div>
|
|
7048
|
+
|
|
7049
|
+
- **Jira Platform Type**: Choose based on your version. For Data Center version, select Self-hosted (Server).
|
|
7050
|
+
- **Service URL**: For Cloud version, enter your actual access URL, e.g., https://your-domain.atlassian.net. For Server version, enter your service access URL, e.g., https://your-jira-server-url.com.
|
|
7051
|
+
- **Username**: Your Jira account name. For Cloud version, enter your email; for Server version, enter your Jira username.
|
|
7052
|
+
- **API Token/Password**: Your Jira account credentials. For Cloud version, enter API Token; for Server version, enter your Jira account password.
|
|
7053
|
+
- After completion, click **Next** to proceed with configuration.
|
|
7054
|
+
|
|
7055
|
+
**About Permissions**: Ensure your Jira account has permissions to access relevant projects, issue types, and create issues. Using an administrator account is recommended.
|
|
7056
|
+
|
|
7057
|
+
### 2. Jira Integration Configuration
|
|
7058
|
+
|
|
7059
|
+
- **Integration Name**: Define a name for this integration.
|
|
7060
|
+
- **Trigger Mode**:
|
|
7061
|
+
- Automatic: Configure conditions for Flashduty to automatically sync qualifying incidents to Jira.
|
|
7062
|
+
- Manual: Manually trigger Jira sync from the incident details page's more actions menu (integration name serves as trigger name).
|
|
7063
|
+
- **Project ID**: Select the target Jira project for synchronization.
|
|
7064
|
+
- **Issue Type**: Select the target Jira issue type.
|
|
7065
|
+
- **Channel**: Select the channel where this integration will be active. Only incidents within this channel can sync to Jira.
|
|
7066
|
+
- **Severity Mapping**: If the selected issue type doesn't support priority fields, this mapping cannot be configured.
|
|
7067
|
+
- **Custom Field Mapping**: Choose to sync certain or all incident labels and custom field content to Jira fields (text type fields only).
|
|
7068
|
+
|
|
7069
|
+
### 3. About Updates
|
|
7070
|
+
|
|
7071
|
+
- For incidents with existing Jira issues, updates to severity or status will automatically update in Jira, but Jira updates won't sync back to Flashduty.
|
|
7072
|
+
- Comments sync to Jira, but Jira comments won't sync back to Flashduty.
|
|
7073
|
+
- Updates to incident title, description, labels, or other fields won't update in Jira.
|
|
7074
|
+
|
|
7075
|
+
### 4. Flashduty to Jira Mapping
|
|
7076
|
+
|
|
7077
|
+
#### Field Mapping
|
|
7078
|
+
|
|
7079
|
+
| Jira | Flashduty |
|
|
7080
|
+
| ---------- | -------- |
|
|
7081
|
+
| Summary | Title |
|
|
7082
|
+
| Description | Description |
|
|
7083
|
+
| Priority | Severity |
|
|
7084
|
+
| Reporter | Integration configured user |
|
|
7085
|
+
| Comments | Comments |
|
|
7086
|
+
|
|
7087
|
+
#### Status Mapping
|
|
7088
|
+
|
|
7089
|
+
| Jira | Flashduty |
|
|
7090
|
+
| ---------- | -------- |
|
|
7091
|
+
| Todo | Pending |
|
|
7092
|
+
| In Progress | In Progress |
|
|
7093
|
+
| Done | Resolved |
|
|
7094
|
+
|
|
7095
|
+
### 5. Important Notes
|
|
7096
|
+
|
|
7097
|
+
- Flashduty syncs information according to default field mappings and your custom field configurations. If your Jira issue type has required fields without mapping relationships, Jira issue creation may fail.
|
|
7098
|
+
- Jira issue details are accessed using project KEY + number format. If you modify the project KEY, saved issue URLs in Flashduty may become inaccessible, so please modify project KEYs with caution.
|
|
7099
|
+
`,ZStack:`---
|
|
7100
|
+
title: "zstack integration"
|
|
7101
|
+
description: "Push ZStack alerts to Flashduty via webhook, to achieve automatic alert noise reduction."
|
|
7102
|
+
date: "2024-07-05T10:00:00+08:00"
|
|
7103
|
+
url: "https://docs.flashcat.cloud/en/flashduty/zstack-integration-guide"
|
|
7104
|
+
---
|
|
7105
|
+
|
|
7106
|
+
Push ZStack alerts to Flashduty via webhook, to achieve automatic alert noise reduction.
|
|
7107
|
+
|
|
7108
|
+
<div class="hide">
|
|
7109
|
+
|
|
7110
|
+
## In Flashduty
|
|
7111
|
+
---
|
|
7112
|
+
You can obtain an integration push URL through either of these two methods:
|
|
7113
|
+
|
|
7114
|
+
### Using Dedicated Integration
|
|
7115
|
+
|
|
7116
|
+
Choose this method when you don't need to route alert events to different channels. It's simpler and recommended.
|
|
7117
|
+
|
|
7118
|
+
<details>
|
|
7119
|
+
<summary>Expand</summary>
|
|
7120
|
+
|
|
7121
|
+
1. Go to the Flashduty console, select **Channel**, and enter a channel's details page
|
|
7122
|
+
2. Select the **Integration** tab, click **Add Integration** to enter the integration page
|
|
7123
|
+
3. Choose **ZStack** integration and click **Save** to generate a card
|
|
7124
|
+
4. Click the generated card to view the **push URL**, copy it for later use, and you're done
|
|
7125
|
+
|
|
7126
|
+
</details>
|
|
7127
|
+
|
|
7128
|
+
### Using Shared Integration
|
|
7129
|
+
|
|
7130
|
+
Choose this method when you need to route alerts to different channels based on the alert event's payload information.
|
|
7131
|
+
|
|
7132
|
+
<details>
|
|
7133
|
+
<summary>Expand</summary>
|
|
7134
|
+
|
|
7135
|
+
1. Go to the Flashduty console, select **Integration Center=>Alert Events** to enter the integration selection page
|
|
7136
|
+
2. Select **ZStack** integration:
|
|
7137
|
+
- **Integration Name**: Define a name for this integration
|
|
7138
|
+
3. Click **Save** and copy the newly generated **push URL** for later use
|
|
7139
|
+
4. Click **Create Route** to configure routing rules for the integration. You can match different alerts to different channels based on conditions, or set a default channel as a fallback and adjust as needed later
|
|
7140
|
+
5. Done
|
|
7141
|
+
|
|
7142
|
+
</details>
|
|
7143
|
+
</div>
|
|
7144
|
+
|
|
7145
|
+
|
|
7146
|
+
## In ZStack
|
|
7147
|
+
---
|
|
7148
|
+
|
|
7149
|
+
<div class="md-block">
|
|
7150
|
+
|
|
7151
|
+
## 一、Create Notification Object
|
|
7152
|
+
|
|
7153
|
+
### Step 1: Create Notification Object
|
|
7154
|
+
1. Login to your \`ZStack\` console, find \`Cloud Monitoring\` in the \`Platform O&M\` menu
|
|
7155
|
+
2. Click \`Endpoint\`, click \`Create Endpoint\` or edit the existing endpoint
|
|
7156
|
+
3. In the edit page, Name it \`Flashduty\`, select \`Webhook\` type, and fill in the <span class='integration_url'>push URL</span> of the alert integration
|
|
7157
|
+
4. Click \`Send Test Message\`, if the message is sent successfully, it means the configuration is successful
|
|
7158
|
+
5. Click \`OK\` to complete the configuration
|
|
7159
|
+
|
|
7160
|
+
<img alt="drawing" width="600" src="https://download.flashcat.cloud/flashduty/doc/en/fd/zstack-1.png" />
|
|
7161
|
+
|
|
7162
|
+
### Step 2: Use Notification Object in Alert Policy
|
|
7163
|
+
|
|
7164
|
+
1. Login to your \`ZStack\` console, find \`Cloud Monitoring\` in the \`Platform O&M\` menu
|
|
7165
|
+
2. Click \`Alarm\`, click \`Create Resource Alarm\` or \`Create Event Alarm\`, or edit the existing alarm object
|
|
7166
|
+
3. In the edit page, select the created \`Flashduty\` Endpoint (\`Resource Alarm\` is recommended to open the recovery notification)
|
|
7167
|
+
4. Configure other settings as needed, and click \`OK\` to complete the configuration
|
|
7168
|
+
|
|
7169
|
+
<img alt="drawing" width="600" src="https://download.flashcat.cloud/flashduty/doc/en/fd/zstack-2.png" />
|
|
7170
|
+
|
|
7171
|
+
|
|
7172
|
+
|
|
7173
|
+
</dev>
|
|
7174
|
+
|
|
7175
|
+
## 二、Status Mapping
|
|
7176
|
+
|
|
7177
|
+
<div class="md-block">
|
|
7178
|
+
|
|
7179
|
+
| ZStack | Flashduty | Status |
|
|
7180
|
+
| ---------- | -------- | ---- |
|
|
7181
|
+
| Emergent | Critical | Critical |
|
|
7182
|
+
| Major | Warning | Warning |
|
|
7183
|
+
| Info | Info | Info |
|
|
7184
|
+
|
|
7185
|
+
</div>
|
|
7186
|
+
|
|
6622
7187
|
`};n.FlashDocsEn=u})(window);
|