Slack¶
ASAB IRIS can send notifications to Slack channels.
Use Slack when LogMan.io notifications should appear in a team channel, for example for operational alerts, incident updates, or monitoring messages.
Prerequisites¶
Before configuring Slack, make sure that:
- access to the Slack workspace where notifications will be sent is available
- permission to create or install a Slack app in that workspace is available
- the Slack app has the required bot token scopes
- the Slack app is invited to the target public channel
- the LogMan.io server can reach Slack over HTTPS
- a secure place is available for storing the Slack Bot User OAuth Token
Required configuration fields¶
| Field | Description |
|---|---|
token |
Slack OAuth access token for the Slack app. |
channel |
Slack channel name where IRIS sends messages. |
Configuration sample¶
Edit model.yaml to configure the asab-iris service:
/Site/model.yaml
define:
type: rc/model
services:
asab-iris:
instances:
- node1
asab:
config:
slack:
token: "{{SLACK_TOKEN}}"
channel: "logman-alerts"
secrets:
SLACK_TOKEN: {}
Slack app setup¶
- Open Slack API Apps.
- Click Create New App.
- Select From scratch.
- Enter an app name, for example
LogMan.io IRIS. - Select the Slack workspace.
- Click Create App.
- Open OAuth & Permissions.
- Under Bot Token Scopes, add:
chat:writechannels:readfiles:writefiles:read- Click Install to Workspace.
- Approve the installation.
- Copy the Bot User OAuth Token. It usually starts with
xoxb-.
Channel setup¶
- Open Slack.
- Go to the channel where IRIS should send notifications.
- Invite the Slack app to the channel.
- Use the channel name in the IRIS
channelconfiguration.
Do not include # in the channel name. For example, use logman-alerts, not #logman-alerts.
Apply the configuration¶
- Store the Slack token in Vault or in the deployment secret store used by the LogMan.io installation.
- Update
/Site/model.yaml. - Apply the model from the Library, or run the deployment apply command used by the installation.
- Send a test Slack notification.
Verify the configuration¶
The configuration is ready when:
- ASAB IRIS starts without Slack configuration errors
- the Slack app is installed in the correct workspace
- the Slack app is present in the configured public channel
- a test notification appears in the configured channel
- the ASAB IRIS service logs do not contain Slack API errors
Slack templates¶
Slack notification templates must be stored in the /Templates/Slack/ directory in the Library.
The message body can use template parameters, so one template can be reused for different notifications.