Configure the OOS ChatOps Agent Feishu bot
Integrate the Operation Orchestration Service (OOS) ChatOps Agent with a Feishu bot to query, operate, and troubleshoot cloud resources through natural-language conversations on your phone. This tutorial describes how to authorize the integration by scanning a QR code in the OOS console and how to add the bot to a Feishu group chat.
Background
Operations and maintenance (O&M) teams must respond to alerts, manage resources, and troubleshoot issues anytime, anywhere. The traditional approach relies on logging on to the console from a PC, which limits response efficiency in scenarios such as business travel and meetings.
By integrating the OOS ChatOps Agent into Feishu, you can query, operate, and troubleshoot cloud resources through natural-language conversations on your phone at any time and from any location.
For example, when a site reliability engineering (SRE) team received an alert in a Feishu group late at night, the engineers @mentioned the ChatOps Agent directly in the group, queried the status of the abnormal instance, and performed a restart. They completed fault recovery within 5 minutes without opening a computer.
By combining a Feishu bot with the OOS ChatOps Agent, fault response is no longer limited by devices or scenarios.
Prerequisites
The Feishu app installed on your phone to scan the QR code and confirm the authorization.
A Resource Access Management (RAM) role that the ChatOps Agent uses to access your cloud resources. Grant only the minimum required permissions to the RAM role (for example, allow the intern group to run queries only).
A Feishu group chat to which you want to add the bot.
Considerations
Secondary confirmation for sensitive operations: All write operations (such as delete and scale-out) trigger secondary confirmation by default to prevent accidental operations.
Configuration steps
Solution overview
With QR code authorization, you can complete the configuration in the OOS console in just two steps:
In the OOS console, select the Feishu type and complete authorization by scanning a QR code.
After the configuration is complete, the bot connects automatically. No additional action is required.
After the console configuration is complete, add the bot to a Feishu group chat to start using it.
This solution uses a WebSocket long connection, so you do not need to create an app or configure event subscriptions on the Feishu Open Platform.
QR code authorization is provided by AppFlow. After you scan the code, AppFlow automatically retrieves the app credentials (App ID and App Secret) and creates a connection flow.
Create a configuration in the OOS console
Log on to the OOS console. In the left-side navigation pane, click ChatOps Agent.
Click Creat Configuration.
Enter a configuration name (for example,
my-feishu-bot).Set the type to Lark.
Complete the configuration
Select a RAM role to authorize the ChatOps Agent to access your cloud resources.
Click Create and wait for the configuration to complete.
After the configuration is complete, the bot connects to Feishu automatically over WebSocket. You can then @mention the bot in a Feishu group to start a conversation.
Add the bot to a group chat
In Feishu, open the target group chat and choose Group Settings > Group Bot > Add Bot.
Search for and select the bot that you just created, and then confirm adding it.
After the bot is added, @mention the bot name in the group and send a message to use the ChatOps Agent.
Scenarios and benefits
You can complete the entire configuration in 1 to 2 minutes. The following table compares the Feishu bot solution with the traditional console-based approach in common scenarios:
Scenario | Traditional method | Feishu bot solution | Value |
Emergency fault response | Wait until you can log on to a computer to handle the fault | @mention the bot in a Feishu group and complete the operation on your phone within 5 seconds | Reduces the mean time to recovery (MTTR) and safeguards business continuity |
O&M while traveling | Depend on access to a computer | Operate directly on your phone | Improves mobile flexibility |
Cross-team collaboration | Coordinate accounts and operations through back-and-forth communication | Commands in the group are transparent and visible, enabling multi-person collaboration | Lowers communication costs and improves O&M auditability |
Routine resource inspection | Check the status of each resource one by one | Get results with one click in the group | Saves inspection time |