|
| 1 | +--- |
| 2 | +title: "Dingtalk Alert Integration" |
| 3 | +description: "Generate a unique Dingtalk robot address in Flashduty, and synchronize the occurrence and recovery of alerts through Dingtalk" |
| 4 | +date: "2025-05-19T10:00:00+08:00" |
| 5 | +url: "https://docs.flashcat.cloud/en/flashduty/dingtalk-alert-integration-guide" |
| 6 | +--- |
| 7 | + |
| 8 | +Generate a unique Dingtalk robot address in Flashduty, and synchronize the occurrence and recovery of alerts through Dingtalk. |
| 9 | + |
| 10 | +<div class="hide"> |
| 11 | + |
| 12 | +## Operation Steps |
| 13 | +--- |
| 14 | + |
| 15 | +### Create Dingtalk Alert Integration |
| 16 | + |
| 17 | +You can obtain a Dingtalk alert integration address through either of these two methods: |
| 18 | + |
| 19 | +#### Using Dedicated Integration |
| 20 | + |
| 21 | +Choose this method when you don't need to route alert events to different channels. It's simpler and recommended. |
| 22 | + |
| 23 | +<details> |
| 24 | + <summary>Expand</summary> |
| 25 | + |
| 26 | + 1. Go to the Flashduty console, select **Channel**, and enter a specific channel's details page |
| 27 | + 2. Select the **Integration** tab, click **Add Integration** to enter the integration page |
| 28 | + 3. Choose **Dingtalk Alert** integration and click **Save** to generate a card |
| 29 | + 4. Click the generated card to view the **Dingtalk Alert Integration URL**, copy it for later use, and you're done |
| 30 | + |
| 31 | +</details> |
| 32 | + |
| 33 | +#### Using Shared Integration |
| 34 | + |
| 35 | +Choose this method when you need to route alerts to different channels based on the alert event's payload information. |
| 36 | + |
| 37 | +<details> |
| 38 | + <summary>Expand</summary> |
| 39 | + |
| 40 | + 1. Go to the Flashduty console, select **Integration Center => Alert Events** to enter the integration selection page |
| 41 | + 2. Select **Dingtalk Alert** integration: |
| 42 | + - **Integration Name**: Define a name for the current integration |
| 43 | + - **Message Type**: Select Dingtalk alert message type, currently only Text and Markdown are supported |
| 44 | + - **Push Mode**: Choose when to trigger or recover alerts for Dingtalk notifications |
| 45 | + 3. Copy the **Dingtalk Alert Integration URL** for later use |
| 46 | + 4. Configure the default route and select the corresponding channel (after integration creation, you can go to `Routes` to configure more routing rules) |
| 47 | + 5. Done |
| 48 | + |
| 49 | +</details> |
| 50 | +</div> |
| 51 | + |
| 52 | +### Customize Dingtalk Alert Integration |
| 53 | + |
| 54 | +#### Dingtalk Alert Integration URL |
| 55 | + |
| 56 | +The system will generate a unique Dingtalk alert integration URL for you. This URL is compatible with Dingtalk robot message protocol. When platforms only support Dingtalk robot channels, you can use this URL to receive corresponding messages. |
| 57 | + |
| 58 | +#### Push Mode |
| 59 | + |
| 60 | +By default, the system always creates new alerts for each message, but you can switch to these modes: |
| 61 | + |
| 62 | +1. **Trigger or Update Alert Based on Message Title**: In this mode, when receiving a new message, the system searches for open alerts based on the message title. If an alert is found, it will be updated; otherwise, a new alert will be triggered. |
| 63 | +2. **Trigger or Close Alert Based on Rules**: In this mode, when receiving a new message, the system matches messages according to your rules and triggers new alerts or closes existing alerts based on the matching results. |
| 64 | + |
| 65 | + - You need to fill in at least one **trigger** rule |
| 66 | + - You must set up regex extraction rules for Alert Key. The system uses this field to find historical alerts for updates or closure. **If regex extraction fails, the system will use the message title to generate an Alert Key** to ensure alerts won't be lost due to configuration errors |
| 67 | + - You can choose whether to discard messages when none of the rules match |
| 68 | + |
| 69 | + Configuration example: |
| 70 | + |
| 71 | + - Receive all messages, close the alert when the message content contains **RESOLVED**, otherwise trigger a new alert |
| 72 | + - Extract Alert Key from message title using the rule **/(.*)/**. |
| 73 | + |
| 74 | + |
| 75 | +### Notes |
| 76 | +- Dingtalk alert integration URL only supports Text and Markdown message types; other message types cannot be received |
| 77 | +- When Dingtalk message type is Text, Flashduty will generate a default alert title "Dingtalk Alert" |
| 78 | + |
| 79 | +## Severity Mapping |
| 80 | +--- |
| 81 | + |
| 82 | +Currently, all alerts pushed to Flashduty through email integration are set to Warning severity. |
| 83 | + |
0 commit comments