VKE supports integrating logs and events from various resources in clusters with TLS. This achieves persistent storage of logs and events and enables alert notifications to be received through different channels. This topic provides an example on how to configure Feishu log alerts to help you promptly detect and respond to in-cluster exceptions.
VKE clusters support log and event collection for multiple resources, such as Kubernetes native events, container logs and events, control plane add-on logs, and cluster audit logs. By collecting and querying logs, you can understand the running status of basic resources, key add-ons, and applications in clusters, and perform troubleshooting when failures occur. In addition, it supports persistently storing cluster Pod events in TLS. This helps you retain and trace critical events such as resource changes, abnormal scheduling, and add-on restarts, achieving event visibility that logs cannot provide. For more details, see the following documentation:
On this basis, you can use the log delivery and alerting features provided by TLS. When critical logs or exceptions meet the trigger conditions, the system automatically sends alert notifications. This helps you perceive cluster risks at the earliest opportunity and shorten failure response time.
TLS supports various alert notification methods. This topic provides an example on how to configure Feishu log alerts for VKE clusters. For more configuration methods, see Alert overview. Step 1: Configure a Feishu bot
tip
Feishu alert bots may vary based on different organizations. This topic uses a custom bot as an example. If you do not know the alert bot name in your organization, contact your Feishu administrator.
- Use your Feishu account to log in to Feishu and create or find the group that needs to receive alerts. Click ... in the upper‑right corner of the group and click Settings from the drop‑down menu.
- In the pop-up panel, click Bots and click Add bot.
- In the bot list, click Custom Bot and click Add.
- Configure the information about the bot.
- Specify the name and description of the bot.
- View and configure the information about the bot.
- Copy the Webhook URL of the bot. This address will be used in subsequent configuration.
- Select Set signature verification and copy the Key. This key will be used in subsequent configuration.
- Click Finish to add the bot.
Step 2: Configure Webhook integration
- In the top navigation bar, select the target region.
- In the left navigation pane, click Log alarm > Notification management.
- Click the Webhook integration tab. Click Create webhook integration to configure the integration for the Feishu bot. Where:
- Select Lark from the Type drop-down list.
- Set the Request address parameter to the webhook URL of the Feishu bot.
- Set the Encryption key parameter to the key of the Feishu bot.
- Click Create to complete the configuration.
Step 3: Create a notification group
- In the left navigation pane, click Log alarm > Notification management. Click Create notification group and configure the details of the group.
- Click Add channel to configure the alert notification channel. Then select the Feishu bot webhook integration configuration that has been set up.
- Click Create notification group to complete the configuration.
Step 4: Create an alert policy
- In the left navigation pane, click Log alarm > Alarm policy. Click Create alarm policy and configure the policy details.
- Configure the basic information and select the project for cluster integration from the Project drop-down list.
- Configure the monitoring task. In the Execute task section, click Edit. In the pop-up dialog box, configure the monitoring target and query statement. In this example, the query statement cluster_id: "cda****" is used to query events of a specific cluster.
Description
- You can also use the intelligent assistant to help generate query and search statements. For details, see Smart assistant copilot.
- Configure alert notifications. Click Associate notification group to associate with the created notification group.
- (Optional) Click Test alarm policy to debug the alerting feature.
- If the test is successful, the message The test was successful will be displayed on the page. In addition, a test alert notification will be received through the specified alert channel.
- If the alert trigger condition, custom API callback URL, or other alert configurations are invalid, the alert test feature will return corresponding error messages. You can troubleshoot based on the error messages and retry. For details, see Common causes for test failures.
- Specify other parameters and then click Create alarm policy to complete the configuration.
- After you have completed alert-related configuration, when an alert that matches the defined rules is triggered, a notification will be sent to Feishu through the specified Feishu bot. You will receive the alert notification details in the group.
- In the left navigation pane of the TLS console, click Log alarm > Alarm History to view the generated log alerts.