Sending Event Alarms to WeCom
Overview
CAE can send notifications when instance scheduling, health check, image pull, volume mounting, or container startup succeeds or fails. By configuring event notification rules, you can learn about the component running status in a timely manner and quickly locate faults. The configuration of event notification rules depends on the AOM and SMN services. Component instance events are reported to AOM. You can choose Application O&M Management > Alarm Management > Alarm List > Events to view the reported events. SMN is the sender of alarm messages.
By default, CAE reports component instance events to AOM. After configuring event notification rules, CAE creates topics and subscribers in SMN, and creates alarm rules and alarm action rules in AOM.
Prerequisites
SMN allows you to subscribe to WeCom, DingTalk, and Lark group messages. Currently, these functions are in the open beta test (OBT). You need to apply for the OBT qualification first.
- You have enabled WeCom and created a group chatbot.
- You have submitted a service ticket to apply for the SMN OBT qualification on Huawei Cloud and enabled the OBT.
Procedure
- Log in to CAE and choose System Settings.
- Click Edit in the Event Notification Rules module.
- Click Create Event Notification Rule and configure basic information by referring to Table 1.
Table 1 Configuring basic information Parameter
Description
Name
Enter an event notification rule name. For example, container-Initiate.
The value starts and ends with a letter and contains 1 to 64 characters, including letters, digits, hyphens (-), and underscores (_).
Trigger Event
Select an event that triggers notification from the drop-down list. For example, Container started up.
Effected Components
Select All in the environment.
Alarm Policy
Trigger Mode: Select Immediate.
- Select WeCom chatbot for Notified By.
Enter the WeCom chatbot endpoint address, which is a webhook address starting with https://qyapi.weixin.qq.com/cgi-bin/webhook/send.
For details about how to obtain a WeCom subscription endpoint, see How Does DingTalk, Lark, or WeCom Chatbot Obtain Subscription Endpoints?
Figure 2 Configuring event notification
- Click OK.
- In the component list, select the target component and click More > Restart in the Operation column.
After the component is restarted, log in to AOM to view the event list or receive alarms in your WeCom group.
- Log in to AOM to view the list of events reported by CAE.
- Choose Alarm Management > Alarm List > Events.
- Select Select all for Event Severity.
- Set the filter criterion to Event Source: CAE and click .
- Receive alarms in your WeCom groups.
- Log in to AOM to view the list of events reported by CAE.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot