Configure Alert Notifications for Slack
Objective
This document provides instructions on how to configure alert notifications in F5® Distributed Cloud Services to route the alert messages to your Slack channel. For information on alerts, see Alerts.
Prerequisites
-
A valid Account is required. If you do not have an account, see Getting Started with Console.
-
A Slack account with administrative privileges to integration settings.
Configuration
Configuring to send alerts to a Slack channel requires you to first generate webhook for your Slack channel. After that, create alert receiver and policy in the F5® Distributed Cloud Console.
Configuring to send alerts to the Slack channel requires you to create alert receiver and policy in the F5 Distributed Cloud Console.
Create Webhook for Slack Channel
This example shows instructions on generating the webhook configuration for a Slack channel.
Step 1: Generate webhook configuration from Slack.
Log into your enterprise Slack portal, follow the instructions in the Incoming Webhooks for Slack page to generate the webhook for the channel to which you want to post the alerts.
Step 2: Obtain URL from generated webhook configuration in Slack.
-
Navigate to your application settings on Slack, obtain webhook URL under the Webhook URLs for Your Workspace section.
-
This example shows a sample webhook settings on Slack.

Figure: Slack Incoming Webhook URL
Create Alert Receiver
Alerts can be created in different workspaces and namespaces. Alert functionality is available in Multi-Cloud Network Connect, Multi-Cloud App Connect, Web App & API Protection, Distributed Apps, Audit Logs and Alerts, and Shared Configuration.
This example shows alert notifications for Slack setup in Shared Configuration.
Step 1: Start Alert Receiver creation in F5® Distributed Cloud Console.
- Open
F5® Distributed Cloud Consolehomepage, selectShared Configurationbox.
Note: Homepage is role based, and your homepage may look different due to your role customization. Select
All workspacesdrop-down menu to discover all options. Customize Settings:Administration>Personal Management>My Account>Edit work domain & skillsbutton >Advancedbox > checkWork Domainboxes >Save changesbutton.

Figure: Alert Homepage
Note: Confirm
Namespacefeature is in correct namespace, drop-down selector located in upper-left corner. Not available in all services.
- Select
Managein left column menu > selectAlerts Management>Alert Receivers.
Note: If options are not showing available, select
Showlink inAdvanced nav options visiblein bottom left corner. If needed, selectHideto minimize options from Advanced nav options mode.
- Select
+ Add Alert Receiverbutton.

Figure: Alert Receiver
Step 2: Configure Alert Receiver.
-
Enter
Name, enterLabelsandDescriptionas needed. -
Select
SlackinReceiverdrop-down menu.

Figure: Alert Policy Configuration
Step 3: Configure secret for receiver.
- Select
ConfigureinWebhook URLbox.
Note: This opens the alert receiver secret configuration form.
-
Select
Blindfolded SecretinSecret Typedrop-down menu. -
Select
Blindfold New SecretinActiondrop-down menu. -
Select
Built-ininPolicy Typedrop-down menu. -
Enter
stringin theSecret to Blindfoldbox obtained from applying Blindfold to webhook configuration. -
See Blindfold your Application Secrets for information on how to encrypt your application secrets.
-
Select
Apply.

Figure: Alert Receiver Secret Configuration
Note: You can also select other values for the
Secret Typefield, and set the subsequent values as per the following guideline.
Secret Guideline Clear Secret Enter the value for the URL in the string:///<string>format.
It is recommended to encode your secret using the Base64 encryption, and set the secret encoding as Base64. However, in case of clear secret, select the encoding as
EncodingNone.
You can apply Base64 encoding to the webhook URL using the
echo -n <URL> | base64command.
Step 4: Configure Slack channel, complete creating receiver.
-
Enter
channelname of Slack channel (to which you want to send the alerts). -
Select
Save and Exitbutton to complete creating the alert receiver.

Figure: Alert Receiver Configuration
Create Alert Policy
Step 1: Create Alert Policy.
-
Select
Manage>Alerts Management>Alert Policies. -
Select
+ Add Alert Policybutton.

Figure: Create Alert Policy
Step 2: Add receiver to policy.
- Enter
Name, enterLabelsandDescriptionas needed.
Note: Toggle
Show Advanced Fieldsto showConfigureReceiver Default Notification Parameters.
-
+ Select Itemdrop-down menu inAlert Receiver Configurationbox. -
Select
receiveryou created in Create Alert Receiver chapter. -
Select
+ Add itembutton inAlert Receiverspage. -
Select your receiver if available in list.
Note:
+ Add itembutton to add multiple Alert Receivers.

Figure: Alert Policy Receiver Configuration
Step 3: Optionally, configure notification intervals.
-
Enable
Show Advanced Fieldsoption inAlert Receiver Configurationsection. -
Select
Configurelink inReceiver Default Notification Parameterssection. This opens notification parameter configuration. -
Enter configuration for the
Notification Parameters.-
Toggle
Show Advanced Fieldsin both sections to open configuration options. -
Enter a value in the
[0-9][smhd]format inNotify Interval for a Alert. The[smhd]specifies seconds, minutes, hours, and days. An example value is60mand default is4h. -
Enter a value in the
[0-9][smhd]format inWait to Notify. The[smhd]specifies seconds, minutes, hours, and days. An example value is2mand default is30s. -
Enter a value in the
[0-9][smhd]format inNotify Interval for a Group. The[smhd]specifies seconds, minutes, hours, and days. An example value is5mand default is1m.
Note: All fields must be in 2-digit form (60m, 60s) in
Policy Rule Notification Parametersfor intervals, and group notifications for your policy rules to apply correctly and not error. -

Figure: Alert Policy Route Configuration
- Select
Applyto apply the notification parameters, and return to the policy configuration.
Step 4: Optionally, configure policy rules.
A minimum of one policy rule is populated by default with Any as match condition and Send as Action. You can select different match conditions, and actions from the drop-down list for the Select Alerts, and Action fields respectively. You can use combination of more than one policy rule. Select Add item to add more policy rules.
-
Select
Configurelink inPolicy Rulesbox -
Select
+ Add Itembutton. -
Select Alertsdrop-down menu option,Anyoption is default.
Note:
Matching Custom Criteria>AlertnameConfigurelink >Select Matcher Type> selectApplybutton > selectApplybutton.
-
Select
Actiondrop-down menu option,Sendis default. -
Select
Applybutton. -
Order rules by dragging in
Policy Rulespage. -
Select
Applybutton, order rules by dragging.
Step 5: Complete creating policy.
Select Save and Exit button to complete creating the alert policy.
Create Active Alert Policies
Step 1: Start creating active alert policies.
- In
Multi-Cloud Network Connect> SelectManage.
Note:
Active Alert Policiescan be created and edited inMulti-Cloud Network Connect,Multi-Cloud App Connect,Web App & API Protection, andDistributed Appsworkspaces by selectingManage>Alerts Management>+ Select Active Alert Policies.
-
Select
Alerts Management> selectActive Alert Policies. -
+ Select Active Alert Policies.

Figure: Active Alert Policy Configuration
Step 2: Add active alert policies to the policy.
-
Select itemdrop-down menu to select created alert policy needed. -
+ Add Itembutton inActive Alert Policiespop-up window to add policy selection drop-down menus.

Figure: Active Alert Policy Configuration
Step 3: Complete creating the active alert policies.
Select Save and Exit button to complete creating the alert policy.
Verification and Example
You can now verify the alert notifications by visiting your Slack channel.