You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/on-call/integration/alert-integration/label-enhancement.mdx
+141-3Lines changed: 141 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: "Label Enhancement"
3
-
description: "Label enhancement automatically generates new labels during alert ingestion to supplement source data. Examples: extract IP from description, map resource ID to readable name, combine multiple fields to generate jump links"
3
+
description: "Label enhancement automatically generates new labels during alert ingestion to supplement source data. Examples: extract IP from description, map resource ID to readable name, combine multiple fields to generate jump links, query external systems via API for dynamic data"
@@ -104,7 +105,18 @@ Multiple rules execute sequentially from top to bottom. When a rule doesn't matc
104
105
</Tab>
105
106
106
107
<Tabtitle="Label Mapping">
107
-
**Scenario**: When source alert label values are variable and not intuitively meaningful, use mapping to map source labels to newly defined labels and values. For example, source alerts only have resource type IDs, but want to show corresponding resource type names.
108
+
**Scenario**: When source alert label values are variable and not intuitively meaningful, use mapping to map source labels to newly defined labels and values.
109
+
110
+
Label mapping supports two mapping methods:
111
+
112
+
| Mapping Type | Description | Use Case |
113
+
| :--- | :--- | :--- |
114
+
|**Schema (Mapping Table)**| Static mapping via predefined CSV mapping table | Mapping relationships are relatively fixed with limited data |
115
+
|**API (API Mapping)**| Dynamic mapping by calling external API service | Need to query external systems (e.g., mapping api) for real-time data |
116
+
117
+
<Tabs>
118
+
<Tabtitle="Schema Mapping">
119
+
**Example**: Source alerts only have resource type IDs, want to show corresponding resource type names.
108
120
109
121
<Steps>
110
122
<Steptitle="Prepare Mapping Table File">
@@ -152,7 +164,46 @@ Prepare a CSV format mapping table file to map resource type IDs in alerts to ac
152
164
</Step>
153
165
</Steps>
154
166
</Tab>
167
+
168
+
<Tabtitle="API Mapping">
169
+
**Example**: Need to query responsible team, service tier, and other dynamic data from mapping api system based on host information in alerts.
170
+
171
+
<Steps>
172
+
<Steptitle="Create Mapping Service">
173
+
1. Go to `Integration Center` → `Mapping Service` → `Create Mapping Service`
174
+
2. Fill in service configuration:
175
+
176
+
| Configuration | Description | Example |
177
+
| :--- | :--- | :--- |
178
+
| Service Name | Readable name for the service | Mapping api Asset Query Service |
179
+
| Description | Service purpose description | Query asset info by host IP |
180
+
| Request URL | API request address |`https://mapping-api.example.com/v1/enrich-event`|
| Retry Count | Number of retries after failure | 2 |
184
+
185
+
<Tip>
186
+
If the API uses HTTPS with an untrusted certificate, you can enable the `Skip Certificate Verification` option.
187
+
</Tip>
188
+
</Step>
189
+
190
+
<Steptitle="Configure Mapping Rule">
191
+
Add a mapping rule in label enhancement, select mapping type as `API`:
192
+
1. Select the created mapping service
193
+
2. Configure `Result Label List`: specify label names expected from API response, e.g., `owner_team`, `service_tier`, `host_ip`
194
+
3. Enable `Override` option as needed
195
+
</Step>
196
+
197
+
<Steptitle="Verify Mapping Result">
198
+
When an alert is triggered, Flashduty automatically calls the configured API service, sends alert event data to the external system, and adds the returned labels to the alert.
199
+
</Step>
200
+
</Steps>
201
+
</Tab>
155
202
</Tabs>
203
+
</Tab>
204
+
</Tabs>
205
+
206
+
## Mapping Data Management
156
207
157
208
### Mapping Table Data Management
158
209
@@ -171,9 +222,96 @@ In the mapping table details page, you can manage mapping table data:
171
222
</Frame>
172
223
173
224
<Tip>
174
-
For frequently changing mapping relationships (like CMDB data sync), we recommend using [Flashduty API](https://developer.flashcat.cloud/api-142429470) for automated updates.
225
+
For frequently changing mapping relationships (like Mapping api data sync), we recommend using API mapping, or use [Flashduty API](https://developer.flashcat.cloud/api-142429470) for automated mapping table updates.
175
226
</Tip>
176
227
228
+
### Mapping Service API Specification
229
+
230
+
When using API mapping, your external API service must follow these specifications:
231
+
232
+
#### Request Specification
233
+
234
+
Flashduty will call your API via `POST` method with the following request body:
0 commit comments