flashduty-knowledge-base 1.2.4-beta.5 → 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 +643 -187
- package/dist/esm/zh.js +355 -39
- package/dist/iife/en.js +627 -171
- package/dist/iife/zh.js +342 -26
- package/dist/zh.d.ts +1 -0
- package/package.json +1 -1
package/dist/iife/en.js
CHANGED
|
@@ -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,38 +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
|
|
6149
6150
|
|
|
6150
|
-
Below are specific instructions for each notification channel.
|
|
6151
|
+
Below are specific instructions for each notification channel.
|
|
6151
6152
|
|
|
6152
6153
|
<div class="feishu_app hide">
|
|
6153
6154
|
|
|
6154
6155
|
## Feishu/Lark App
|
|
6155
6156
|
---
|
|
6156
|
-
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:
|
|
6157
6158
|
|
|
6158
|
-
\`\`\`
|
|
6159
|
+
\`\`\`go
|
|
6159
6160
|
{{if .Description}}**description** :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6160
6161
|
{{if .Labels.resource}}**resource** : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6161
6162
|
{{range $k, $v := .Labels}}
|
|
@@ -6164,15 +6165,14 @@ You need to configure \`Integration Center - IM - Feishu/Lark\` integration firs
|
|
|
6164
6165
|
|
|
6165
6166
|
As shown below:
|
|
6166
6167
|
|
|
6167
|
-
<img src="https://download.flashcat.cloud/flashduty/
|
|
6168
|
-
|
|
6168
|
+
<img src="https://download.flashcat.cloud/flashduty/changelog/20230720/feishu_app_render.png" alt="drawing" style="display: block; margin: 0 auto;" width="500"/>
|
|
6169
6169
|
|
|
6170
|
-
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:
|
|
6171
6171
|
|
|
6172
|
-
- We've listed some common labels
|
|
6173
|
-
- 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
|
|
6174
6174
|
|
|
6175
|
-
\`\`\`
|
|
6175
|
+
\`\`\`go
|
|
6176
6176
|
{{if (index .Labels "resource")}}resource:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6177
6177
|
{{if (index .Labels "check")}}check:{{toHtml (index .Labels "check")}}{{end}}
|
|
6178
6178
|
{{if (index .Labels "metric")}}metric:{{index .Labels "metric"}}{{end}}
|
|
@@ -6200,9 +6200,9 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6200
6200
|
|
|
6201
6201
|
## Dingtalk App
|
|
6202
6202
|
---
|
|
6203
|
-
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:
|
|
6204
6204
|
|
|
6205
|
-
\`\`\`
|
|
6205
|
+
\`\`\`go
|
|
6206
6206
|
{{if .Description}}**description** :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6207
6207
|
{{if .Labels.resource}}**resource** : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6208
6208
|
{{range $k, $v := .Labels}}
|
|
@@ -6210,15 +6210,15 @@ You need to configure \`Integration Center - IM - Dingtalk\` integration first t
|
|
|
6210
6210
|
\`\`\`
|
|
6211
6211
|
|
|
6212
6212
|
As shown below:
|
|
6213
|
-
<img src="https://download.flashcat.cloud/flashduty/doc/en/fd/template-ding-1.png" width="800">
|
|
6214
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"/>
|
|
6215
6215
|
|
|
6216
|
-
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:
|
|
6217
6217
|
|
|
6218
|
-
- We've listed some common labels
|
|
6219
|
-
- 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
|
|
6220
6220
|
|
|
6221
|
-
\`\`\`
|
|
6221
|
+
\`\`\`go
|
|
6222
6222
|
{{if (index .Labels "resource")}}**resource**:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6223
6223
|
{{if (index .Labels "metric")}}**metric**:{{index .Labels "metric"}}{{end}}
|
|
6224
6224
|
{{if (index .Labels "prom_ql")}}**prom_ql**:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
@@ -6245,12 +6245,13 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6245
6245
|
|
|
6246
6246
|
## WeCom App
|
|
6247
6247
|
---
|
|
6248
|
-
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:
|
|
6249
6248
|
|
|
6250
|
-
-
|
|
6251
|
-
- 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:
|
|
6252
6250
|
|
|
6253
|
-
|
|
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
|
|
6254
6255
|
{{if (index .Labels "resource")}}resource:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6255
6256
|
{{if (index .Labels "metric")}}metric:{{index .Labels "metric"}}{{end}}
|
|
6256
6257
|
{{if (index .Labels "prom_ql")}}prom_ql:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
@@ -6274,19 +6275,19 @@ You need to configure \`Integration Center - IM - WeCom\` integration first to s
|
|
|
6274
6275
|
|
|
6275
6276
|
As shown below:
|
|
6276
6277
|
|
|
6277
|
-
<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"/>
|
|
6278
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**
|
|
6279
6281
|
|
|
6280
|
-
**Note: WeCom limits card length. In the template rendering area, you can render up to 8 lines of content. Content beyond 8 lines will be hidden**
|
|
6281
6282
|
</div>
|
|
6282
6283
|
|
|
6283
6284
|
<div class="slack_app hide">
|
|
6284
6285
|
|
|
6285
6286
|
## Slack App
|
|
6286
6287
|
---
|
|
6287
|
-
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:
|
|
6288
6289
|
|
|
6289
|
-
\`\`\`
|
|
6290
|
+
\`\`\`go
|
|
6290
6291
|
{{if .Description}}*description* :{{toHtml .Labels.body_text .Description}}{{end}}
|
|
6291
6292
|
{{if .Labels.resource}}*resource* : {{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6292
6293
|
{{range $k, $v := .Labels}}
|
|
@@ -6297,18 +6298,18 @@ As shown below:
|
|
|
6297
6298
|
|
|
6298
6299
|
<img src="https://download.flashcat.cloud/flashduty/integration/slack/slack_app_message.png" alt="drawing" style="display: block; margin: 0 auto;" width="600"/>
|
|
6299
6300
|
|
|
6300
|
-
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:
|
|
6301
6302
|
|
|
6302
|
-
- We've listed some common labels
|
|
6303
|
-
- Messages can be around 15000 characters long, content beyond
|
|
6304
|
-
- 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
|
|
6305
6306
|
|
|
6306
|
-
\`\`\`
|
|
6307
|
+
\`\`\`go
|
|
6307
6308
|
{{if (index .Labels "resource")}}*resource*:{{toHtml (joinAlertLabels . "resource" ", ")}}{{end}}
|
|
6308
6309
|
{{if (index .Labels "metric")}}*metric*:{{index .Labels "metric"}}{{end}}
|
|
6309
6310
|
{{if (index .Labels "prom_ql")}}*prom_ql*:{{toHtml (index .Labels "prom_ql")}}{{end}}
|
|
6310
6311
|
{{if (index .Labels "trigger_value")}}*trigger_value*:{{index .Labels "trigger_value"}}{{end}}
|
|
6311
|
-
{{if (index .Labels "host_ql")}}*host_ql*:{{
|
|
6312
|
+
{{if (index .Labels "host_ql")}}*host_ql*:{{index .Labels "host_ql"}}{{end}}
|
|
6312
6313
|
{{if (index .Labels "region")}}*region*:{{index .Labels "region"}}{{end}}
|
|
6313
6314
|
{{if (index .Labels "cluster")}}*cluster*:{{index .Labels "cluster"}}{{end}}
|
|
6314
6315
|
{{if (index .Labels "business")}}*business*:{{index .Labels "business"}}{{end}}
|
|
@@ -6323,19 +6324,392 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6323
6324
|
{{if (index .Labels "name")}}*name*:{{index .Labels "name"}}{{end}}
|
|
6324
6325
|
{{if (index .Labels "mode")}}*mode*:{{index .Labels "mode"}}{{end}}
|
|
6325
6326
|
{{if (index .Labels "runbook_url")}}*runbook_url*:{{index .Labels "runbook_url"}}{{end}}
|
|
6326
|
-
\`\`\`
|
|
6327
|
+
\`\`\`
|
|
6328
|
+
</div>
|
|
6329
|
+
|
|
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
|
|
6656
|
+
---
|
|
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>
|
|
6700
|
+
\`\`\`
|
|
6327
6701
|
</div>
|
|
6328
6702
|
|
|
6329
6703
|
<div class="zoom hide">
|
|
6330
6704
|
|
|
6331
6705
|
## Zoom Bot
|
|
6332
6706
|
---
|
|
6333
|
-
- Messages
|
|
6334
|
-
- If text contains \`<br>\`,
|
|
6335
|
-
- Message format \`follows Zoom message format\`.
|
|
6336
|
-
- If custom content is
|
|
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:
|
|
6337
6711
|
|
|
6338
|
-
\`\`\`
|
|
6712
|
+
\`\`\`json
|
|
6339
6713
|
{"head": {
|
|
6340
6714
|
"text": "{{fireReason .}}INC [#{{.Num}}] {{toHtml .Title}}",
|
|
6341
6715
|
"style": {
|
|
@@ -6347,7 +6721,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6347
6721
|
"body": [
|
|
6348
6722
|
{
|
|
6349
6723
|
"type": "message",
|
|
6350
|
-
"text": "Channel
|
|
6724
|
+
"text": "Channel: {{if .ChannelName}}{{.ChannelName}}{{else}}None{{end}}",
|
|
6351
6725
|
"style": {
|
|
6352
6726
|
"bold": false,
|
|
6353
6727
|
"italic": false
|
|
@@ -6355,7 +6729,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6355
6729
|
},
|
|
6356
6730
|
{
|
|
6357
6731
|
"type": "message",
|
|
6358
|
-
"text": "Severity
|
|
6732
|
+
"text": "Severity: {{.IncidentSeverity}}",
|
|
6359
6733
|
"style": {
|
|
6360
6734
|
"bold": false,
|
|
6361
6735
|
"italic": false,
|
|
@@ -6364,7 +6738,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6364
6738
|
},
|
|
6365
6739
|
{
|
|
6366
6740
|
"type": "message",
|
|
6367
|
-
"text": "Duration
|
|
6741
|
+
"text": "Duration: {{ago .StartTime}}{{if gt .AlertCnt 1}}",
|
|
6368
6742
|
"style": {
|
|
6369
6743
|
"bold": false,
|
|
6370
6744
|
"italic": false
|
|
@@ -6372,7 +6746,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6372
6746
|
},
|
|
6373
6747
|
{
|
|
6374
6748
|
"type": "message",
|
|
6375
|
-
"text": "Grouped alerts
|
|
6749
|
+
"text": "Grouped alerts: {{.AlertCnt}}{{end}}{{if .Labels.resource}}",
|
|
6376
6750
|
"style": {
|
|
6377
6751
|
"bold": false,
|
|
6378
6752
|
"italic": false
|
|
@@ -6380,7 +6754,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6380
6754
|
},
|
|
6381
6755
|
{
|
|
6382
6756
|
"type": "message",
|
|
6383
|
-
"text": "
|
|
6757
|
+
"text": "Alert targets: {{.Labels.resource}}{{end}}{{if .Description}}",
|
|
6384
6758
|
"style": {
|
|
6385
6759
|
"bold": false,
|
|
6386
6760
|
"italic": false
|
|
@@ -6388,7 +6762,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6388
6762
|
},
|
|
6389
6763
|
{
|
|
6390
6764
|
"type": "message",
|
|
6391
|
-
"text": "Description
|
|
6765
|
+
"text": "Description: {{toHtml .Description}}{{end}}{{if gt (len .Responders) 0}}",
|
|
6392
6766
|
"style": {
|
|
6393
6767
|
"bold": false,
|
|
6394
6768
|
"italic": false
|
|
@@ -6396,7 +6770,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6396
6770
|
},
|
|
6397
6771
|
{
|
|
6398
6772
|
"type": "message",
|
|
6399
|
-
"text": "Responders
|
|
6773
|
+
"text": "Responders: {{range .Responders}}@{{.PersonName}}{{end}}{{end}}",
|
|
6400
6774
|
"style": {
|
|
6401
6775
|
"bold": false,
|
|
6402
6776
|
"italic": false
|
|
@@ -6404,12 +6778,12 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6404
6778
|
},
|
|
6405
6779
|
{
|
|
6406
6780
|
"type": "message",
|
|
6407
|
-
"text": "View
|
|
6781
|
+
"text": "View Details",
|
|
6408
6782
|
"link": "{{.DetailUrl}}{{if .IsFlapping}}"
|
|
6409
6783
|
},
|
|
6410
6784
|
{
|
|
6411
6785
|
"type": "message",
|
|
6412
|
-
"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}}",
|
|
6413
6787
|
"style": {
|
|
6414
6788
|
"bold": true,
|
|
6415
6789
|
"italic": false
|
|
@@ -6417,7 +6791,7 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6417
6791
|
},
|
|
6418
6792
|
{
|
|
6419
6793
|
"type": "message",
|
|
6420
|
-
"text": "Note:
|
|
6794
|
+
"text": "Note: The current incident has grouped {{.AlertCnt}} alerts, triggering an alert storm. Please handle with urgency!{{end}}",
|
|
6421
6795
|
"style": {
|
|
6422
6796
|
"bold": true,
|
|
6423
6797
|
"italic": false
|
|
@@ -6428,14 +6802,13 @@ If you want to display only key label information, you can refer to the code sni
|
|
|
6428
6802
|
\`\`\`
|
|
6429
6803
|
</div>
|
|
6430
6804
|
|
|
6431
|
-
|
|
6432
6805
|
<div class="sms hide">
|
|
6433
6806
|
|
|
6434
6807
|
## SMS
|
|
6435
6808
|
---
|
|
6436
|
-
If custom content is
|
|
6809
|
+
If no custom content is set, the system default template will be used for notifications:
|
|
6437
6810
|
|
|
6438
|
-
\`\`\`
|
|
6811
|
+
\`\`\`go
|
|
6439
6812
|
You have a pending incident: {{toHtml .Title}}, Channel: {{.ChannelName}}, Severity: {{.IncidentSeverity}}{{if gt .AlertCnt 1}}, Grouped {{.AlertCnt}} alerts{{end}}
|
|
6440
6813
|
\`\`\`
|
|
6441
6814
|
</div>
|
|
@@ -6444,97 +6817,98 @@ You have a pending incident: {{toHtml .Title}}, Channel: {{.ChannelName}}, Sever
|
|
|
6444
6817
|
|
|
6445
6818
|
## Email
|
|
6446
6819
|
---
|
|
6447
|
-
If custom content is
|
|
6820
|
+
If no custom content is set, the system default template will be used for notifications:
|
|
6448
6821
|
|
|
6449
|
-
\`\`\`
|
|
6822
|
+
\`\`\`html
|
|
6450
6823
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
6451
6824
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
6452
6825
|
<title>{{.Title}}</title>
|
|
6453
6826
|
<html lang="en">
|
|
6454
6827
|
|
|
6455
6828
|
<head data-id="__react-email-head">
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
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>
|
|
6468
6841
|
</head>
|
|
6469
6842
|
|
|
6470
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">
|
|
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
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
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>
|
|
6529
6902
|
</body>
|
|
6530
6903
|
|
|
6531
6904
|
</html>
|
|
6532
6905
|
\`\`\`
|
|
6533
6906
|
|
|
6534
|
-
As shown below:
|
|
6535
|
-
<img src="https://download.flashcat.cloud/flashduty/doc/en/fd/template-mail-1.png" width="800">
|
|
6907
|
+
As shown in the image below:
|
|
6536
6908
|
|
|
6537
|
-
|
|
6909
|
+
<img src="https://download.flashcat.cloud/flashduty/changelog/20230720/email_render.png" alt="drawing" style="display: block; margin: 0 auto;" width="500"/>
|
|
6910
|
+
|
|
6911
|
+
</div>`,HuaweiyunAPM:`---
|
|
6538
6912
|
title: "Huawei Cloud APM Alerts"
|
|
6539
6913
|
description: "Sync Huawei Cloud APM alerts to Flashduty through webhook to achieve automatic alert noise reduction"
|
|
6540
6914
|
date: "2024-07-05T10:00:00+08:00"
|
|
@@ -6640,4 +7014,86 @@ When you need to route alerts to different channels based on alert payload infor
|
|
|
6640
7014
|
|
|
6641
7015
|
</div>
|
|
6642
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.
|
|
6643
7099
|
`};n.FlashDocsEn=u})(window);
|