Sending failure alerts with a Feishu bot
You can configure an event rule for an E-HPC cluster to automatically send node fault notifications to a Feishu group using a Feishu bot.
Background information
E-HPC integrates with EventBridge to deliver events, such as cluster node faults, to a dedicated event bus. This integration allows you to receive, query, and consume fault events. You can configure rules for E-HPC fault events, such as GPU or eRDMA faults, to send notifications to a Feishu group through a Feishu bot, ensuring you receive timely information about cluster node failures.
Notification workflow: A fault occurs in a cluster node → An EventBridge event rule is triggered → EventBridge sends the event to the Feishu bot webhook address → The Feishu bot sends a message to the Feishu group.
Prerequisites
Before you begin, complete the following steps:
Activate EventBridge
Log on to the EventBridge console and click Activate Now to activate the service.(Optional) Upgrade the cluster client version
To use the fault event notification feature, upgrade the EHPCUtils client on your cluster to a supported version. For instructions on how to upgrade a single node or the entire cluster, see the Upgrade the cluster client version section of this topic.
Step 1: Create a Feishu bot
Create a Feishu bot to get a unique webhook address. This address is used to connect to EventBridge and receive notifications.
Log on to the Feishu desktop client and select the group chat where you want to receive fault notifications.
On the group chat page, click the Settings icon in the upper-right corner to go to the Settings page.
On the Settings page, click Group Bots.
On the Add Bots page, click Custom Bot.
On the Create Bot page, enter a custom name and description for the bot, and then click Add.
On the Webhook address page, copy and save the webhook address. In the Security Settings section, you can select Custom Keywords and enter a keyword, such as "cluster". Then, click Finish.
For more information, see the Feishu for Developers documentation: Add a custom bot.
Step 2: Configure an E-HPC fault event rule
An event rule listens for specific types of fault events. When an event matches the rule, EventBridge sends the event to the Feishu bot, which in turn delivers it to the Feishu group.
Log on to the EventBridge console.
In the left-side navigation pane, click Event Bus.
In the top navigation bar, select a region.
Note: You cannot configure events across regions.On the Event Bus page, click default to go to the default event bus configuration page.
In the left-side navigation pane, click Event Rules, and then click Create Rule.
In the Create Rule panel, follow the on-screen wizard to complete the configuration.
Configure basic information
Enter a name and an optional description for the rule, and then click Next.
Configure the event pattern
Parameter | Description |
Event Source Type | Select Official Alibaba Cloud Event Source. |
Event Source | Select acs.ehpc. |
Event Type | Select the fault event types to monitor. This topic uses ehpc:Maintenance:NodeGpuFault and ehpc:Maintenance:NodeErdmaFault as examples. You can select other E-HPC fault event types as needed. |
After you complete the configuration, click Next.
Configure the event target
Parameter | Description |
Service Type | Select Feishu (acs.lark). |
Address | Enter the webhook address of the Feishu bot from Step 1. |
Variables: Copy the following JSON snippet to extract fields from the event.
{
"Uid": "$.data.Uid",
"SeverityLevel": "$.data.SeverityLevel",
"ExecuteCmd": "$.data.ExecuteCmd",
"ClusterId": "$.data.ClusterId",
"InstanceId": "$.data.InstanceId",
"InstanceIp": "$.data.InstanceIp",
"InstanceName": "$.data.InstanceName",
"FaultDetail": "$.data.FaultDetail",
"FaultType": "$.data.FaultType",
"FaultTarget": "$.data.FaultTarget",
"InstanceType": "$.data.InstanceType",
"MessageId": "$.data.MessageId",
"DetectedAt": "$.data.DetectedAt",
"aliyunregionid": "$.aliyunregionid",
"eventID": "$.id"
}Template Copy the following JSON snippet to define the Feishu message content. You can customize it based on the Feishu bot documentation.
{
"msgtype": "text",
"text": {
"content": "Dear Alibaba Cloud customer ${Uid},\nThis is a notification that a node fault occurred in your Elastic High Performance Computing cluster ${ClusterId} in the ${aliyunregionid} region at ${DetectedAt}. Details are as follows:\n\tInstance ID: ${InstanceId}\n\tInstance IP: ${InstanceIp}\n\tInstance hostname: ${InstanceName}\n\tInstance type: ${InstanceType}\n\tFault type: ${FaultType}\n\tFault target: ${FaultTarget}\n\tMessage ID: ${MessageId}\n\tSeverity level: ${SeverityLevel}\n\tFault details: ${FaultDetail}\n\nPS: The event ID for this incident is ${eventID}. If you have any questions about using E-HPC, please provide this event ID when you submit a ticket."
}
}If you are prompted for authorization during the initial setup, follow the on-screen instructions to grant the necessary permissions. After you complete the configuration, click Create.
Verify the results
After you complete the configuration, EventBridge delivers matching fault events, such as ehpc:Maintenance:NodeGpuFault or ehpc:Maintenance:NodeErdmaFault, to the Feishu bot, which then sends a notification to your Feishu group. You can also use the test event sending feature in the EventBridge console to verify that Feishu can receive messages correctly.
Fault details and troubleshooting steps
After you receive a fault notification, you can use the following tables to identify the fault type and perform initial troubleshooting.
GPU faults
Fault details | Description | Actions |
gpu [xxx] driver not installed correctly | The driver is not installed. | Install the driver. |
[xxx] gpu device(s) lost | The GPU device is lost. | Contact your TAM for assistance. |
gpu [xxx] InfoROM corrupted | The InfoROM is corrupted. | A firmware upgrade is required. Contact your TAM for assistance. |
gpu [xxx] find xid error | Xid error. | Restart the instance based on the error code, or contact your TAM for assistance. |
gpu [xxx] find power cable error | GPU power supply is abnormal. | Contact your TAM for assistance. |
gpu [xxx] find double bit error | Double Bit Error (DBE). | Contact your TAM for assistance. |
gpu [xxx] kernel upgrade abnormally | A kernel upgrade causes a driver exception. | Uninstall and then reinstall the driver. |
gpu [xxx] fabricmanager service not running | The Fabric Manager service is not running. | Install or start the nvidia-fabricmanager component service. |
gpu [xxx] NVLink state abnormal | The NVLink state is abnormal. | Contact your TAM for assistance. |
eRDMA faults
Fault item | Description | Actions |
device not exist | The ENI does not exist. | Contact your TAM for assistance. |
driver not installed | The eRDMA driver is not installed. | Reinstall the erdma-installer driver in the console. |
tools not installed | The additional tools for the eRDMA driver are not installed. | Reinstall the erdma-installer driver in the console. |
function not installed | The ibv_devinfo command is failing or not found, which may be caused by a NIC being down. | Contact your TAM for assistance. |
network ip abnormal | An IP address cannot be obtained because the NIC is down. | Manually run |
gid abnormal | The GID is abnormal. | This is typically a warning and is not exposed to users. |
For more GPU diagnostic methods, see Run one-click GPU diagnostics using a Cloud Assistant plug-in.
Run checks in bulk (optional)
If you need to proactively check multiple nodes for errors, you can use the Run Command feature in the E-HPC console to run a diagnostic script on multiple nodes simultaneously.
Go to the E-HPC console, click Cluster in the left-side navigation pane, and go to your target cluster.
In the list of nodes, select the nodes you want to check, and then click Run Command.
In the command window, enter the following script, and then click Execute:
#!/bin/bash
hpcacc gpu check --format json
hpcacc erdma check --format readableIn the command output, view the check results for each node. If there are errors, refer to the tables in the "Fault details and troubleshooting steps" section for recommended actions.
(Optional) Upgrade the cluster client version
To use the fault event notification feature, ensure the E-HPC client on your cluster nodes, including the ehpc-faultevent.service, meets the required version.
Upgrade the entire cluster
Log on to the Elastic High Performance Computing console.
In the top navigation bar, select a region.
In the left-side navigation pane, click Cluster, and go to the details page of your target cluster.
On the Cluster Configuration tab, find the Version Information section, click Upgrade, and follow the prompts to upgrade EHPCUtils to the latest version.
Upgrade a single node
To upgrade a single node from its current version (for example, 2.0.41) to a specific version (for example, 2.0.47), run the following commands on the node. Replace the example version numbers with the actual versions from the console or documentation.
/usr/local/ehpc/bin/ehpcutil upgrade --target_version 2.0.47 --checksum 2.0.47
echo "2.0.41" > /usr/local/ehpc_2.0.47/agent/version
systemctl restart ehpc-agent
# Update HPC-ACC
/usr/local/ehpc/bin/ehpcutil tools hpc_acc install --update
bash /usr/local/hpc_acc_util_latest/deploy.shRequirements: The node version must not be rolled back by the heartbeat service; the node status must remain normal; the fault event notification service ehpc-faultevent.service must start correctly; and the single-node upgrade must not affect future upgrades of the entire cluster.
Roll back a single node
This rollback procedure applies only to the single-node upgrade scenario described above. If you need to roll back the version for an entire cluster, use the OpenAPI.
echo "2.0.47" > /usr/local/ehpc_2.0.47/agent/version
/usr/local/ehpc/bin/ehpcutil upgrade --target_version 2.0.41 --checksum 2.0.41
systemctl restart ehpc-agent
systemctl stop ehpc-faultevent
systemctl disable ehpc-faultevent
rm -rf /etc/systemd/system/ehpc-faultevent.serviceAfter the rollback, the fault event notification service on this node is uninstalled, and it will no longer report fault events.