Slack
Slack#
Overview#
This integration sends out notifications to Slack.
Prerequisites#
- A Slack server/workspace needs to be setup first.
- You need to create a channel Incoming WebHook in your Slack workspace. To get it or create it, go to your Slack Incoming Webhooks page.
Configure the channel#
Go in Configuration Management

Go in Alert Channel, and hit the + button.

Select the slack template . Select the Analytic Engine on which you want this configuration to be deployed; and provide a Configuration Name that is meaningful for you. The Description is optional.
[[slack]]
enabled = true
default = true
workspace = "example.slack.com"
url = "https://hooks.slack.com/xxxx/xxxx/xxxx"
channel = "#alerts"
username = "unryo"
global = false
state-changes-only = false
ssl-ca = "/path/to/ca.crt"
ssl-cert = "/path/to/cert.crt"
ssl-key = "/path/to/private-key.key"
insecure-skip-verify = false
Enter the correct settings: * workspace: Your Slack workspace * url: Your Slack incoming webhook url. To get it or create it, go to your Slack Incoming Webhooks page * channel: Your Slack channel * username: The username for the bot's message
Other configuration options are possible, such as: * Global: When this option is set to true, slack notifications will be sent for all alerts, even if not explicitely specified in the alert configuration.
Once done, click Apply. Your Channel is ready.
Configure your Alert Definitions#
Go in Alert Definitions, and edit the configuration(s) for which you want Slack notification.

Add the Slack settings, as per the example below:
.slack().workspace('workspace.slack.com').channel('#alerts').username('unryo').iconEmoji(':smile:')
Once done, click Apply. Your Alert definition is ready to send slack notification.