Operation steps
Create Lark Bot Compatible integration
You can obtain a Lark Bot Compatible integration address through either of these two methods:Use a dedicated integration
Choose this option if all alerts go to one channel. It’s the simpler setup.View dedicated integration setup steps
View dedicated integration setup steps
- In the Flashduty console, select Channel and open a channel
- Select Configuration → Integrations → Private integration, then click Add integration
- Choose Lark Bot Compatible integration and click Save to generate a card
- Click the generated card to view the Lark Bot Compatible Integration URL, copy it for later use, and you’re done
Use a shared integration
Choose this option if you need to route alerts to different channels based on the alert payload.Configure the Lark Bot Compatible integration
1
Choose the message type and push mode in Flashduty
Where: Flashduty › Integration Center › Alert events › Lark Bot Compatible › Alert push settings
With message type Text, the alert title is always “飞书告警”, so Trigger or update alert based on message title isn’t offered, and rules can only extract the Alert Key from Message content.Click Save and copy the Push URL.
2
Replace the Lark (Feishu) custom bot webhook URL with the push URL in the sender
Where: the webhook settings of the Lark (Feishu) custom bot notification in the sending tool (menus vary by tool)
3
Send a test message from the sender and confirm
Where: the test option of that webhook notification in the sending tool (if there’s no test option, wait for a real alert)After a few seconds, the integration in Flashduty shows a Latest event time, which means the setup works. If it doesn’t, check that the message type is supported (see “Notes” below).
Push modes and rules
With Trigger or close alert based on rules:
- At least one trigger rule is required.
- Close rules are checked before trigger rules; within each type, rules are checked in the configured order, and the first match wins.
- Every rule needs an Alert Key regex. The system uses the Alert Key to find the open alert to update or close. The regex must be a valid RE2 expression; it is validated on save, and an invalid expression is rejected with the message “Please enter valid regex”.
- The Alert Key is built from the regex capture groups, joined with
,. If the regex captures nothing, the system builds the Alert Key from the message title, so a bad rule doesn’t lose alerts. - Default rules: if none of the rules above match, create new alert (Alert Key built from the message title) or discard message.
-
Rule 1: close, condition “Message content matches
/RESOLVED/” -
Rule 2: trigger, condition “Message content matches
/PROBLEM/” -
Both rules extract the Alert Key from Message content with the regex:
PROBLEM: web-01 disk usage 93% and RESOLVED: web-01 disk usage 71% both capture web-01 disk, so they get the same Alert Key and the recovery message closes the alert. The regex has no ^, because other text may come before it in the message content.
Why /(.*)/ can’t be used as the Alert Key regex
/(.*)/ captures the whole content. Trigger and recovery messages have different content and so get different Alert Keys; the recovery message finds no matching alert, and the alert is never closed. Capture only the part that identifies the problem, such as the host and check in the example above.
No-event detection
No-event detection works for push alert integrations, except HTTP Pull and DB Pull: when an integration receives no valid event for the detection period, it creates a Warning alert. The switch is off by default and the detection period defaults to 10 minutes. See Alert integrations overview.Notes
- The Lark Bot Compatible integration only accepts text and post (rich text) messages; other message types can’t be received.
- For text messages, the alert title is “飞书告警”; Rich text messages use their own title. To change the title, use the alert pipeline.
Status and severity
Alerts pushed to Flashduty through the Lark Bot Compatible integration always have Warning severity. To set the severity from the message content, add rules on the integration’s Alert pipeline tab; see alert pipeline.Alibaba Cloud Message Center
The “Robot Reception” feature in Alibaba Cloud’s account Message Center can push account, product, and security notices to a custom webhook. Its data format can reuse the Feishu robot protocol, so it connects directly to the Lark Bot Compatible integration on this page.
- Log in to Alibaba Cloud Message Center, go to Robot Reception Management → Robot Management → Add Robot
- Select Custom for Robot Platform, enter the Lark Bot Compatible Integration URL from above for Webhook Address, and select Format B (typically used by Feishu) for Data Format
- Complete the CAPTCHA verification and save
Notices from Message Center are one-shot — there is no paired recovery message. Refer to “Push modes and rules” above and configure Trigger or update alert based on message title or Trigger or close alert based on rules so alerts don’t stay open forever.
If you’re integrating Alibaba Cloud Monitor (CloudMonitor) alerts, use the Alibaba Cloud Monitor CM Metrics Integration directly for full dedup and recovery support.