After you configure a webhook alert, you can send alert notifications to a specified
webhook URL. Prometheus can send Webhook alert notifications to applications such
as Feishu, WeChat, and DingTalk. This topic describes how to create a webhook alert.
Feishu is used in this example.
Step 1: Create a webhook URL
- Open and log on to Feishu.
- Click the + icon, and then click Add Group to create a Feishu group where alert notifications are sent.
- Click the group settings icon, and then click the Bots tab.
- On the BOTs tab, click Add Bot.
- In the Add Bot dialog box, select Custom Bot.
- Set the Bot name and Description parameters, and then click Next.
- Click Copy to save the value of the Webhook URL parameter, and then click Finish.
Step 2: Create a webhook alert
- Log on to the ARMS console.
- In the left-side navigation pane, choose .
- On the Contact tab, click Create a webhook in the upper-right corner.
- In the Create Webhook dialog box, set the parameters.
The following table describes the parameters.
Parameter |
Description |
Webhook Name |
Required. The name of the custom webhook. |
Post or Get |
Required. The request method. The requested URL cannot exceed 100 characters in length.
In this example, select Post and paste the webhook URL that is saved in the Step 1: Create a webhook URL section to the field.
|
Header and Param |
Optional. The request header. The header cannot exceed 200 characters in length. You
can click + Add to add headers or parameters. The default request header is Content-Type: text/plain; charset=UTF-8. The total number of headers and parameters cannot exceed 6.
In this example, set the following two headers:
- Arms-Content-Type : json
- Content-Type : application/json
|
Body |
Optional. This parameter is available if you use the post method. You can use $content
in the body string as a placeholder of alert content. The body cannot exceed 500 characters
in length.
In this example, use the following alert content format: {"msg_type": "text","content": {"text": "$content"}}
|
- Optional:Click Test to verify whether the configurations are valid.
- Click Create.