This chapter mainly describes how to expand the alarm notification channel so that alarms can be sent to third-party applications.
Microsoft Teams
Goals
●After the alarm created in Honghu is triggered, the alarm notification will be sent to the designated Microsoft Teams channel.
Microsoft official configuration document
创建传入 Webhook - Teams(https://learn.microsoft.com/zh-cn/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=dotnet)
Configuration steps
1. Open "Microsoft Teams", click "..." in the upper right corner, and then click "Connectors"
2. Enter "Incoming Webhook" in the search box on the left, and then click "Add" on "Incoming Webhook" in the search results.
3. Click "Add"
4. After adding, the pop-up box will close. Click "..." in the upper right corner again, and then click "Connector"
5. Click "Configuration" to the right of "Incoming Webhook"
6. After entering the name of the connector in the input box, click "Create"
7. After creation, click the "Copy" button on the same page to copy the URL.
8. Create or edit alarms in Honghu
a. Add "Web Hook" as "Trigger Action"
b. Paste the link address copied in step 7 into "Website"
c. Select "POST" as the request method
d. Fill in the "Header"
{ "Content-Type": "application/json" }
e. Fill in "Load"
{"text": "Message content"}
9. When an alarm is triggered, you can see the corresponding alarm message in the alarm group.
Slack
Goals
●After the alarm created in Honghu is triggered, the alarm notification will be sent to the designated Slack channel
Slack official configuration document
Sending messages using Incoming Webhooks(https://api.slack.com/messaging/webhooks)
Configuration steps
1. Open "Slack" and click the alarm channel name in Slack
2. Click "Integration" and then click "Add App"
3. Search for "Incoming WebHooks" in the search bar and click "Install" in the search results.
4. Click "Add to Slack"
5. Select the corresponding alarm group in "Post to Channel" and click "Add Incoming WebHook ingeration"
6. Copy the "Webhook URL" so that Honghu can configure the "Webhook"
7. Create an alarm or edit an alarm in Honghu
a. Add "Web Hook" as "Trigger Action"
b. Paste the link address copied in step 6 into "Website"
c. Select "POST" as the request method
d. Fill in the "Header"
{ "Content-Type": "application/json" }
e. Fill in "Load"
{"text": "Alarm: test alarm"}
8. When an alarm is triggered, you can see the corresponding alarm message in the alarm group.