Alerts - Slack

Objective

This document provides instructions on how to configure alert notifications in VoltConsole to route the alert messages to your Slack channel. For information on Volterra alerts, see Alerts.


Prerequisites


Configuration

Configuring to send alerts to the Slack channel requires you to first generate webhook for your Slack channel. After that, create alert receiver, policy, and policy set in the VoltConsole.

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 and 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 the URL from the generated webhook configuration in Slack.

Navigate to your application settings on Slack and obtain the webhook URL under the Webhook URLs for Your Workspace section. This example shows a sample webhook settings on Slack.

WhSlack
Figure: Slack Incoming Webhook URL


Create Alert Receiver

This example shows the alert notification for Slack.

Step 1: Start alert receiver creation in VoltConsole.

Log into the VoltConsole and select system namespace or your application namespace in the namespace selector. Select Manage from the configuration menu and Alert Management from the options pane. Select Alert Receivers from the options under the Alert Management and click Add Alert receiver.

AlertRecNav
Figure: Alert Receiver Creation Form

Step 2: Enter name and select Slack for the Receiver field.

ar name
Figure: Alert Receiver Name and Receiver Type

Step 3: Configure the secret for receiver.

Configure the settings for the Secret field as per the following guidelines:

  • Click Configure under the Webhook URL field. This opens the alert receiver secret configuration form.
  • Select Blindfold Secret for the Secret info field.
  • Select Blindfold for the Type field.
  • Enter the string obtained from applying Blindfold to the webhook configuration. See Blindfold your Application Secrets for information on how to encrypt your application secrets.
  • Click Apply.

ar secret new
Figure: Alert Receiver Secret Configuration

Note: You can also select other values for the Secret info field and set the subsequent values as per the following guidelines.

Secret Guidelines
Vault Secret Enter the values for the provider and location.
Clear Secret Enter the value for the URL in the string:///<string> format.
Bootstrap Secret Enter the name of the secret.

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> | base64 command.

Step 4: Configure the slack channel and complete creating the receiver.

Enter the name of the Slack channel (to which you want to send the alerts) in the Channel field. Click Save and Exit to complete creating the alert receiver.

ar basic new
Figure: Alert Receiver Configuration


Create Alert Policy

Step 1: Create alert policy.

Log into the VoltConsole and select system namespace or your application namespace in the namespace selector. Select Manage from the configuration menu and Alert Management from the options pane. Select Alert Policies from the options under the Alert Management and click Add Alert policy.

Step 2: Add receiver to the policy.

Enter a name for the policy and click Select receiver object to open the receiver selection form. Select the receiver you created in the Create Alert Receiver chapter and click Select receiver object to add the receiver to the policy.

ap basic new
Figure: Alert Policy Receiver Configuration

Step 3: Optionally, configure the notification intervals.

Enable Show Advanced Fields option in the Policy Rules section and click Configure under the Policy Rule Notification Parameters field. This opens notification parameter configuration.

Enter the configuration for the Notification Parameters as per the following guidelines:

  • Enter a value in the [0-9][smhd] format for the Notify Interval for a Alert field. The [smhd] specifies seconds, minutes, hours, and days. An example value is 1h and default is 4h.
  • Enter a value in the [0-9][smhd] format for the Wait to Notify field. The [smhd] specifies seconds, minutes, hours, and days. An example value is 2m and default is 30s.
  • Enter a value in the [0-9][smhd] format for the Notify Interval for a Group field. The [smhd] specifies seconds, minutes, hours, and days. An example value is 5m and default is 1m.

ap notif params
Figure: Alert Policy Route Configuration

  • Click Apply to 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. Click Add item to add more policy rules.

Step 6: Complete creating policy.

Click Save and Exit to complete creating the alert policy.


Create Alert Policy Set

Step 1: Start creating the alert policy set.

Log into the VoltConsole and select system namespace or your application namespace in the namespace selector. Select Manage from the configuration menu and Alert Management from the options pane. Select Alert Policy Sets from the options under the Alert Management and click Add Alert policy set.

Step 2: Add alert policies to the policy set.

Add a name and click Select policy object to open the policy selection form. Select the created alert policy and click Select policy object again to add the policies to the policy set.

aps basic new
Figure: Alert Policy Set Configuration

Step 3: Complete creating the policy set.

Click Save and Exit to complete creating the alert policy set.


Verification and Example

You can now verify the alert notifications by visiting your Slack channel. The following image shows a sample of alerts sent to Slack channel:

slack alerts
Figure: Post of Alerts to Slack Channel


Concepts