Configure Generic Webhook Alert Receiver using F5 Distributed Cloud Platform
Webhooks are user-defined HTTP-based callbacks which can be triggered by some event in a web application and notify these events through the user-defined platform services such as SMS, email, Slack and more. A webhook serves the purpose of delivering these events to the users as soon as they trigger. Among these notified events, some require special attention from the users and the user needs to take definite action based on these event notifications.
To setup a webhook, the client provides a unique URL to the server and specifies to which platform that the server needs to send Alerts to. F5 Distributed Cloud (F5 XC) provides the feasibility to configure Webhook to send alert notifications related to Infrastructures, deployments etc. to the clients.
Solution Overview:
Generic webhook provides the ability to send F5 XC alerts related to Applicaiton Infrastructure such as K8s pod not ready, site’s tunnel interface down on customer site, DNS monitoring failed to check origin servers etc. to any endpoint of client’s choice that supports webhooks. The webhook feature can be configured in the Alert Receivers section of the F5 XC Console.
Step-by-Step Configuration:
In this article, we demonstrate configuring alert notifications in F5 XC Console to route alert messages to your Webhook. In the example below, we will demonstrate this behavior using a custom-built Web Application to receive alerts from different F5 XC accounts.
Below are the steps that are to be followed to configure Alert Receiver in F5 XC,
- Create Alert Receiver
- Create Alert Policy
- Select Active Alert Policies
Step 1: Creating Alert Receiver
Login to F5 XC Console and select Shared Configuration service from the home page.
From the Manage section, select Alert Management > Alert Receivers.
Click on “Add Alert Receiver” button in Alert Receiver page to create an Alert Receiver.
- Enter the name of the Alert Receiver.
- Select Webhook from the Receiver dropdown menu.
- From the Webhook URL section, select Configure Link.
- Select Blindfolded Secret from the Secret Type drop-down menu.
- Select Blindfold New Secret from the Action drop-down menu.
- Select Policy Type as ‘Built-in’.
- Enter the Webhook URL of the receiver in Secret to Blindfold in box.
- Click on the Apply button and it redirects back to Alert Receiver Page.
- From the HTTP Configuration Section, select Basic Authentication from the Client Authentication drop-down menu.
- Enter the Username. From the Password section, click on Configure link to enter the password.
- Click on Apply.
- Click on Save and Exit to create the Alert Receiver.
Step 2: Creating Alert Policy
- From the same shared Configuration page, select Manage > Active Management > Alert Policies.
- Select the ‘Add Alert Policy’ button.
- Enter name.
- From the Alert Receiver Configuration section, select the Alert Receiver created from the Alert Receivers drop-down menu.
- From the Policy Rules section, click on configure to define the policy rules.
- Click on the Add Item button from the Policy Rules section.
- In the Route section, select ‘Any’ from the ‘Select Alerts’ drop-down menu and ‘Send’ from the ‘Action’ drop-down. This will result in sending all alerts to the receiver.
- Click on the Apply button.
- Select the Apply button.
- Click on ‘Save and Exit’ button to create policy.
Step 3: Selecting Active Alert Policies
- From F5 XC Console homepage, Navigate to Multi-Cloud Network Connect > select Manage > Alerts Management > Active Alert Policies
- Select the policy created in step 2 under Alert Polices drop-down menu.
- Click on Save and Exit.
As part of webhook demo application, Python along with necessary modules such as Flask were used to receive the Alert Notifications from the F5 XC Console.
Next, we have developed a custom website to view the alerts from different F5 XC accounts. By selecting the alerts from the different F5 XC accounts, displays its respective alerts. Hence, all the alerts can be analyzed from the single website using Webhook.
Conclusion:
F5 Distributed Cloud provides tailored configuration for Webhook alerts with different client Authentication techniques and sends trigger-based alerts to the specified URL. This allows users to view the alerts and take appropriate action.
For more detailed guidance and steps on how to configure Generic Webhook Alerts on F5 XC, refer to the official documentation and resources provided by F5.
https://docs.cloud.f5.com/docs/how-to/alerting/alerts-webhook