flashduty-knowledge-base 1.0.1 → 1.0.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.
Files changed (3) hide show
  1. package/dist/en.cjs +107 -34
  2. package/dist/en.js +112 -39
  3. package/package.json +1 -1
package/dist/en.cjs CHANGED
@@ -51,42 +51,120 @@ Choose this method when you need to route alerts to different channels based on
51
51
  </details>
52
52
  </div>
53
53
 
54
- ## Implementation Protocol
55
- ---
54
+ ## I. Request Description
56
55
 
57
- Please refer to the [Developer Documentation](https://developer.flashcat.cloud/zh/flashduty/event-api/alert-event) to complete the protocol development.
58
-
59
- ## Best Practices
60
- ---
56
+ ### Request Method
61
57
 
62
- 1. Send events to Flashduty when alert status changes
63
- 2. When an alert recovers, send an event with status "Ok" to close the alert. Otherwise, the alert will remain open. If your alert system doesn't have recovery events, we recommend manually sending recovery events
64
- 3. Labels are event descriptions. You should enrich label content as much as possible (specified when sending or generated through enrichment rules), such as:
65
- - Alert source, like host, cluster, check, or metric
66
- - Alert ownership information, like team, owner
67
- - Alert category information, like class (api, db, net)
58
+ POST, Content-Type:"application/json"
68
59
 
60
+ ### Request Parameters:
69
61
 
70
- ## FAQ
71
- ---
62
+ QueryString must include the integration_key parameter for access control.
72
63
 
73
- <details>
74
- <summary>Why haven't I received alerts in Flashduty?</summary>
64
+ JsonBody parameters are as follows:
75
65
 
76
- #### In Flashduty
77
-
78
- 1. Check if the integration shows **Latest Event Time**? If not, Flashduty hasn't received the push, prioritize checking your system
79
- 2. If you're using **Shared Integration**, first confirm whether you've configured **Routing Rules**. Without routing rules, the system will reject new pushes since there's no channel to receive your alerts. In this case, simply configure routing rules to your desired channel
66
+ | Field | Required | Type | Description |
67
+ | :----------: | :------: | :----: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
68
+ | event_status | Yes | string | Alert event status, enumerated values: Critical, Warning, Info, Ok |
69
+ | alert_key | Yes | string | Event grouping basis, different alert events are grouped into one alert based on this field and time window |
70
+ | title_rule | No | string | Alert title generation rule, in the form of \`$a::b::$c\`, substrings are separated by \`::\`; each substring can be a fixed string or a variable prefixed with \`$\`. Variable content will be extracted from the labels parameter, error if not found. By default, the system will generate rules by extracting service, cluster, resource, and check tags from the labels field |
71
+ | description | No | string | Alert description, no more than 2048 characters |
72
+ | labels | No | map | Alert label collection, key is the label name, value is the label value. Labels are event descriptions, crucial for subsequent correlation and noise reduction. 1. Label keys and values are case-sensitive strings. 2. Label keys should not exceed 128 characters. 3. Maximum 50 labels allowed. \`Label content reference\` [Best Practices](#Best-Practices) |
80
73
 
81
- #### In Your System
74
+ </div>
82
75
 
83
- 1. Confirm that your request URL exactly matches the URL in the integration details
84
- 2. Verify that your service can access the external domain api.flashcat.cloud. If not, you need to enable external network access for your server or specifically for the Flashduty domain
85
- 3. Print the response from the Flashduty service to check for specific messages
76
+ ### Response
86
77
 
87
- If you still can't identify the root cause after these steps, please contact us with the **request_id** from the request response
78
+ <div class="md-block">
79
+
80
+ Body:
88
81
 
89
- </details>`,t=`---
82
+ Parameter|Required|Type|Description
83
+ ----------|---|---|---
84
+ request_id|Yes|string|Request trace id for issue tracking
85
+ error|No|[Error](#Error)|Error description, returned only when an error occurs
86
+
87
+ <span id="Error"></span>
88
+ Error:
89
+
90
+ | Parameter | Optional | Type | Description |
91
+ | --------- | -------- | ------ | --------------- |
92
+ | code | Yes | string | Error code |
93
+ | message | Yes | string | Error message |
94
+
95
+ <span id="Code"></span>
96
+ Code:
97
+
98
+ | Error Code | HTTP Status | Description |
99
+ | -------------------- | ----------- | -------------------------------------------------- |
100
+ | InvalidParameter | 400 | Parameter error |
101
+ | InvalidContentType | 400 | Content-Type not supported |
102
+ | MethodNotAllowed | 400 | HTTP method not supported |
103
+ | Unauthorized | 401 | Login authentication failed |
104
+ | AccessDenied | 403 | Permission authentication failed |
105
+ | RequestTooFrequently | 429 | Request too frequent |
106
+ | RouteNotFound | 404 | Request Method+Path not matched |
107
+ | ResourceNotFound | 400 | Account resource not purchased, proceed to billing |
108
+ | InternalError | 500 | Internal or unknown error |
109
+
110
+ </div>
111
+
112
+ ### Request Example
113
+
114
+ Request:
115
+
116
+ \`\`\`
117
+ curl -X POST '{api_host}/event/push/alert/standard?integration_key=$key' \\
118
+ -H 'Content-Type: application/json' \\
119
+ -d '{
120
+ "event_status": "Warning",
121
+ "alert_key": "asdfjl1234asdf2s",
122
+ "description": "cpu idle low than 20%",
123
+ "title_rule": "$cluster::$resource::$check",
124
+ "labels": {
125
+ "service": "engine",
126
+ "cluster":"nj",
127
+ "resource":"es.nj.01",
128
+ "check":"cpu.idle<20%",
129
+ "metric":"node_cpu_seconds_total"
130
+ }
131
+ }' -v
132
+ \`\`\`
133
+
134
+ Successful response:
135
+
136
+ \`\`\`
137
+ {
138
+ "request_id": "0ace00116215ab4ca0ec5244b8fc54b0"
139
+ }
140
+ \`\`\`
141
+
142
+ Failed response:
143
+
144
+ \`\`\`
145
+ {
146
+ "request_id": "0ace00116215abc0ba4e52449bd305b0",
147
+ "error": {
148
+ "code": "InvalidParameter",
149
+ "message": "integration_key is not a valid one"
150
+ }
151
+ }
152
+ \`\`\`
153
+
154
+ <span id="Best-Practices"></span>
155
+
156
+ ## II. Best Practices
157
+
158
+ 1. Send events to Flashcat Cloud when alert status changes or labels are updated
159
+ 2. When an alert recovers, send an event with status Ok to close the alert. Otherwise, the alert will remain open. If your alert system doesn't have recovery events, we recommend manually sending recovery events
160
+ 3. Labels are event descriptions. You should enrich label content as much as possible (specified when sending or generated through enrichment rules), such as:
161
+ - Alert source information: host, cluster, check, or metric
162
+ - Alert ownership information: team, owner
163
+ - Alert category information: class (api, db, net)
164
+ - Alert details link for jumping to the alert system
165
+ 4. alert_key is used to group different alert events into one alert. For example, when a host's cpu.idle drops below threshold, escalates, and recovers, you should send 3 events with the same alert_key, which will be grouped into one alert
166
+ 5. title_rule is used to generate alert display titles. It's recommended to include the source system alert name (commonly defined as rule_name or check) and add cluster, host, and other information as auxiliary reminders
167
+ `,t=`---
90
168
  title: "Email Integration"
91
169
  description: "Generate a unique email address in Flashduty to synchronize alert triggers and recoveries through email"
92
170
  date: "2024-05-11T10:00:00+08:00"
@@ -689,14 +767,9 @@ Choose this method when you need to route alerts to different channels based on
689
767
  ## In Zabbix
690
768
  ---
691
769
 
692
- <<<<<<< HEAD
693
-
694
770
  - [7.x version](#v7)
695
771
  - [5.x~6.x version](#v5)
696
772
  - [3.x~4.x version](#v4)
697
- =======
698
- <div class="md-block">
699
- >>>>>>> 798fffa6edf238347e9cac531eac2314fae21c18
700
773
 
701
774
  <span id="v7"></span>
702
775
 
@@ -4541,7 +4614,7 @@ Once published, you can access the application via mobile/PC client. First-time
4541
4614
  |Group Bot Webhook|Maximum 100 calls/minute|
4542
4615
  |Sending messages to the same user or group|Maximum 5 calls/second|
4543
4616
 
4544
- **Note:** Messages cannot be pushed normally when exceeding limits, please use notification channels reasonably`,O=`---
4617
+ **Note:** Messages cannot be pushed normally when exceeding limits, please use notification channels reasonably`,q=`---
4545
4618
  title: "Dingtalk Integration"
4546
4619
  description: "Integrate with Dingtalk custom application to receive and respond to alerts within Dingtalk"
4547
4620
  date: "2024-05-11T10:00:00+08:00"
@@ -4697,7 +4770,7 @@ After the application is released, you can access it via mobile/PC client. First
4697
4770
  |Enterprise|5,500,000|60|1st of each month|
4698
4771
 
4699
4772
  **Note:** Messages cannot be pushed normally after exceeding limits, please use notification channels reasonably
4700
- `,q=`---
4773
+ `,O=`---
4701
4774
  title: "WeCom Integration"
4702
4775
  description: "Integrate WeCom third-party application to receive and respond to alerts within WeCom"
4703
4776
  date: "2024-05-11T10:00:00+08:00"
@@ -6149,4 +6222,4 @@ If custom content is not set, the system default template will be used for notif
6149
6222
  As shown below:
6150
6223
  <img src="https://download.flashcat.cloud/flashduty/doc/en/fd/template-mail-1.png" width="800">
6151
6224
 
6152
- `;exports.AWSCW=e;exports.AWSEventBridge=A;exports.AlertWebhook=H;exports.AliyunARMS=l;exports.AliyunCm=c;exports.AliyunCmEvent=d;exports.AliyunSLS=e;exports.AppDynamics=R;exports.AzureMonitor=h;exports.BaiDuBCM=u;exports.CustomAction=V;exports.CustomAlert=n;exports.CustomChange=W;exports.Dingtalk=O;exports.Dynatrace=L;exports.Email=t;exports.GoogleCM=F;exports.Grafana=o;exports.Graylog=k;exports.HuaWeiCES=g;exports.HuaweiyunLTS=x;exports.IncidentWebhook=B;exports.InfluxDB=p;exports.Jiankongbao=_;exports.Jira=G;exports.Lark=Y;exports.Meraki=N;exports.MicrosoftTeams=j;exports.N9e=a;exports.OceanBase=C;exports.OpManager=M;exports.OpenFalcon=m;exports.PagerDuty=f;exports.Prometheus=i;exports.Sentry=S;exports.Skywalking=I;exports.Slack=$;exports.SolarWinds=U;exports.Splunk=T;exports.Templates=z;exports.TencentBK=y;exports.TencentCLS=v;exports.TencentCm=b;exports.TencentEb=w;exports.UptimeKuma=r;exports.VolcEngineEvent=D;exports.VolcEngineMetric=E;exports.VolcEngineTLS=P;exports.Wecom=q;exports.Zabbix=s;
6225
+ `;exports.AWSCW=e;exports.AWSEventBridge=A;exports.AlertWebhook=H;exports.AliyunARMS=l;exports.AliyunCm=c;exports.AliyunCmEvent=d;exports.AliyunSLS=e;exports.AppDynamics=R;exports.AzureMonitor=h;exports.BaiDuBCM=u;exports.CustomAction=V;exports.CustomAlert=n;exports.CustomChange=W;exports.Dingtalk=q;exports.Dynatrace=L;exports.Email=t;exports.GoogleCM=F;exports.Grafana=o;exports.Graylog=k;exports.HuaWeiCES=g;exports.HuaweiyunLTS=x;exports.IncidentWebhook=B;exports.InfluxDB=p;exports.Jiankongbao=_;exports.Jira=G;exports.Lark=Y;exports.Meraki=N;exports.MicrosoftTeams=j;exports.N9e=a;exports.OceanBase=C;exports.OpManager=M;exports.OpenFalcon=m;exports.PagerDuty=f;exports.Prometheus=i;exports.Sentry=S;exports.Skywalking=I;exports.Slack=$;exports.SolarWinds=U;exports.Splunk=T;exports.Templates=z;exports.TencentBK=y;exports.TencentCLS=v;exports.TencentCm=b;exports.TencentEb=w;exports.UptimeKuma=r;exports.VolcEngineEvent=D;exports.VolcEngineMetric=E;exports.VolcEngineTLS=P;exports.Wecom=O;exports.Zabbix=s;
package/dist/en.js CHANGED
@@ -51,42 +51,120 @@ Choose this method when you need to route alerts to different channels based on
51
51
  </details>
52
52
  </div>
53
53
 
54
- ## Implementation Protocol
55
- ---
54
+ ## I. Request Description
56
55
 
57
- Please refer to the [Developer Documentation](https://developer.flashcat.cloud/zh/flashduty/event-api/alert-event) to complete the protocol development.
58
-
59
- ## Best Practices
60
- ---
56
+ ### Request Method
61
57
 
62
- 1. Send events to Flashduty when alert status changes
63
- 2. When an alert recovers, send an event with status "Ok" to close the alert. Otherwise, the alert will remain open. If your alert system doesn't have recovery events, we recommend manually sending recovery events
64
- 3. Labels are event descriptions. You should enrich label content as much as possible (specified when sending or generated through enrichment rules), such as:
65
- - Alert source, like host, cluster, check, or metric
66
- - Alert ownership information, like team, owner
67
- - Alert category information, like class (api, db, net)
58
+ POST, Content-Type:"application/json"
68
59
 
60
+ ### Request Parameters:
69
61
 
70
- ## FAQ
71
- ---
62
+ QueryString must include the integration_key parameter for access control.
72
63
 
73
- <details>
74
- <summary>Why haven't I received alerts in Flashduty?</summary>
64
+ JsonBody parameters are as follows:
75
65
 
76
- #### In Flashduty
77
-
78
- 1. Check if the integration shows **Latest Event Time**? If not, Flashduty hasn't received the push, prioritize checking your system
79
- 2. If you're using **Shared Integration**, first confirm whether you've configured **Routing Rules**. Without routing rules, the system will reject new pushes since there's no channel to receive your alerts. In this case, simply configure routing rules to your desired channel
66
+ | Field | Required | Type | Description |
67
+ | :----------: | :------: | :----: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
68
+ | event_status | Yes | string | Alert event status, enumerated values: Critical, Warning, Info, Ok |
69
+ | alert_key | Yes | string | Event grouping basis, different alert events are grouped into one alert based on this field and time window |
70
+ | title_rule | No | string | Alert title generation rule, in the form of \`$a::b::$c\`, substrings are separated by \`::\`; each substring can be a fixed string or a variable prefixed with \`$\`. Variable content will be extracted from the labels parameter, error if not found. By default, the system will generate rules by extracting service, cluster, resource, and check tags from the labels field |
71
+ | description | No | string | Alert description, no more than 2048 characters |
72
+ | labels | No | map | Alert label collection, key is the label name, value is the label value. Labels are event descriptions, crucial for subsequent correlation and noise reduction. 1. Label keys and values are case-sensitive strings. 2. Label keys should not exceed 128 characters. 3. Maximum 50 labels allowed. \`Label content reference\` [Best Practices](#Best-Practices) |
80
73
 
81
- #### In Your System
74
+ </div>
82
75
 
83
- 1. Confirm that your request URL exactly matches the URL in the integration details
84
- 2. Verify that your service can access the external domain api.flashcat.cloud. If not, you need to enable external network access for your server or specifically for the Flashduty domain
85
- 3. Print the response from the Flashduty service to check for specific messages
76
+ ### Response
86
77
 
87
- If you still can't identify the root cause after these steps, please contact us with the **request_id** from the request response
78
+ <div class="md-block">
79
+
80
+ Body:
88
81
 
89
- </details>`, n = `---
82
+ Parameter|Required|Type|Description
83
+ ----------|---|---|---
84
+ request_id|Yes|string|Request trace id for issue tracking
85
+ error|No|[Error](#Error)|Error description, returned only when an error occurs
86
+
87
+ <span id="Error"></span>
88
+ Error:
89
+
90
+ | Parameter | Optional | Type | Description |
91
+ | --------- | -------- | ------ | --------------- |
92
+ | code | Yes | string | Error code |
93
+ | message | Yes | string | Error message |
94
+
95
+ <span id="Code"></span>
96
+ Code:
97
+
98
+ | Error Code | HTTP Status | Description |
99
+ | -------------------- | ----------- | -------------------------------------------------- |
100
+ | InvalidParameter | 400 | Parameter error |
101
+ | InvalidContentType | 400 | Content-Type not supported |
102
+ | MethodNotAllowed | 400 | HTTP method not supported |
103
+ | Unauthorized | 401 | Login authentication failed |
104
+ | AccessDenied | 403 | Permission authentication failed |
105
+ | RequestTooFrequently | 429 | Request too frequent |
106
+ | RouteNotFound | 404 | Request Method+Path not matched |
107
+ | ResourceNotFound | 400 | Account resource not purchased, proceed to billing |
108
+ | InternalError | 500 | Internal or unknown error |
109
+
110
+ </div>
111
+
112
+ ### Request Example
113
+
114
+ Request:
115
+
116
+ \`\`\`
117
+ curl -X POST '{api_host}/event/push/alert/standard?integration_key=$key' \\
118
+ -H 'Content-Type: application/json' \\
119
+ -d '{
120
+ "event_status": "Warning",
121
+ "alert_key": "asdfjl1234asdf2s",
122
+ "description": "cpu idle low than 20%",
123
+ "title_rule": "$cluster::$resource::$check",
124
+ "labels": {
125
+ "service": "engine",
126
+ "cluster":"nj",
127
+ "resource":"es.nj.01",
128
+ "check":"cpu.idle<20%",
129
+ "metric":"node_cpu_seconds_total"
130
+ }
131
+ }' -v
132
+ \`\`\`
133
+
134
+ Successful response:
135
+
136
+ \`\`\`
137
+ {
138
+ "request_id": "0ace00116215ab4ca0ec5244b8fc54b0"
139
+ }
140
+ \`\`\`
141
+
142
+ Failed response:
143
+
144
+ \`\`\`
145
+ {
146
+ "request_id": "0ace00116215abc0ba4e52449bd305b0",
147
+ "error": {
148
+ "code": "InvalidParameter",
149
+ "message": "integration_key is not a valid one"
150
+ }
151
+ }
152
+ \`\`\`
153
+
154
+ <span id="Best-Practices"></span>
155
+
156
+ ## II. Best Practices
157
+
158
+ 1. Send events to Flashcat Cloud when alert status changes or labels are updated
159
+ 2. When an alert recovers, send an event with status Ok to close the alert. Otherwise, the alert will remain open. If your alert system doesn't have recovery events, we recommend manually sending recovery events
160
+ 3. Labels are event descriptions. You should enrich label content as much as possible (specified when sending or generated through enrichment rules), such as:
161
+ - Alert source information: host, cluster, check, or metric
162
+ - Alert ownership information: team, owner
163
+ - Alert category information: class (api, db, net)
164
+ - Alert details link for jumping to the alert system
165
+ 4. alert_key is used to group different alert events into one alert. For example, when a host's cpu.idle drops below threshold, escalates, and recovers, you should send 3 events with the same alert_key, which will be grouped into one alert
166
+ 5. title_rule is used to generate alert display titles. It's recommended to include the source system alert name (commonly defined as rule_name or check) and add cluster, host, and other information as auxiliary reminders
167
+ `, n = `---
90
168
  title: "Email Integration"
91
169
  description: "Generate a unique email address in Flashduty to synchronize alert triggers and recoveries through email"
92
170
  date: "2024-05-11T10:00:00+08:00"
@@ -689,14 +767,9 @@ Choose this method when you need to route alerts to different channels based on
689
767
  ## In Zabbix
690
768
  ---
691
769
 
692
- <<<<<<< HEAD
693
-
694
770
  - [7.x version](#v7)
695
771
  - [5.x~6.x version](#v5)
696
772
  - [3.x~4.x version](#v4)
697
- =======
698
- <div class="md-block">
699
- >>>>>>> 798fffa6edf238347e9cac531eac2314fae21c18
700
773
 
701
774
  <span id="v7"></span>
702
775
 
@@ -4069,7 +4142,7 @@ Choose this method when you need to route alerts to different channels based on
4069
4142
  </div>
4070
4143
 
4071
4144
  </div>
4072
- `, M = `---
4145
+ `, N = `---
4073
4146
  title: "OpManager Alert Events"
4074
4147
  description: "Sync OpManager alert events to Flashduty via webhook for automated alert noise reduction"
4075
4148
  date: "2024-07-05T10:00:00+08:00"
@@ -4203,7 +4276,7 @@ Choose this method when you need to route alerts to different channels based on
4203
4276
  | Attention | Info | Info |
4204
4277
 
4205
4278
  </div>
4206
- `, N = `---
4279
+ `, M = `---
4207
4280
  title: "Meraki Alert Events"
4208
4281
  description: "Sync Meraki alert events to Flashduty via webhook for automated alert noise reduction"
4209
4282
  date: "2024-07-05T10:00:00+08:00"
@@ -4541,7 +4614,7 @@ Once published, you can access the application via mobile/PC client. First-time
4541
4614
  |Group Bot Webhook|Maximum 100 calls/minute|
4542
4615
  |Sending messages to the same user or group|Maximum 5 calls/second|
4543
4616
 
4544
- **Note:** Messages cannot be pushed normally when exceeding limits, please use notification channels reasonably`, O = `---
4617
+ **Note:** Messages cannot be pushed normally when exceeding limits, please use notification channels reasonably`, q = `---
4545
4618
  title: "Dingtalk Integration"
4546
4619
  description: "Integrate with Dingtalk custom application to receive and respond to alerts within Dingtalk"
4547
4620
  date: "2024-05-11T10:00:00+08:00"
@@ -4697,7 +4770,7 @@ After the application is released, you can access it via mobile/PC client. First
4697
4770
  |Enterprise|5,500,000|60|1st of each month|
4698
4771
 
4699
4772
  **Note:** Messages cannot be pushed normally after exceeding limits, please use notification channels reasonably
4700
- `, q = `---
4773
+ `, O = `---
4701
4774
  title: "WeCom Integration"
4702
4775
  description: "Integrate WeCom third-party application to receive and respond to alerts within WeCom"
4703
4776
  date: "2024-05-11T10:00:00+08:00"
@@ -6164,7 +6237,7 @@ export {
6164
6237
  V as CustomAction,
6165
6238
  e as CustomAlert,
6166
6239
  W as CustomChange,
6167
- O as Dingtalk,
6240
+ q as Dingtalk,
6168
6241
  L as Dynatrace,
6169
6242
  n as Email,
6170
6243
  F as GoogleCM,
@@ -6177,11 +6250,11 @@ export {
6177
6250
  _ as Jiankongbao,
6178
6251
  G as Jira,
6179
6252
  Y as Lark,
6180
- N as Meraki,
6253
+ M as Meraki,
6181
6254
  j as MicrosoftTeams,
6182
6255
  t as N9e,
6183
6256
  C as OceanBase,
6184
- M as OpManager,
6257
+ N as OpManager,
6185
6258
  m as OpenFalcon,
6186
6259
  f as PagerDuty,
6187
6260
  a as Prometheus,
@@ -6199,6 +6272,6 @@ export {
6199
6272
  D as VolcEngineEvent,
6200
6273
  E as VolcEngineMetric,
6201
6274
  P as VolcEngineTLS,
6202
- q as Wecom,
6275
+ O as Wecom,
6203
6276
  o as Zabbix
6204
6277
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flashduty-knowledge-base",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "flashduty knowledge base",
5
5
  "type": "module",
6
6
  "scripts": {