Welcome to Opslane
Slack Bot Setup
Set up the Opslane Slack bot to automatically analyze and respond to alerts
Opslane Slack Bot Introduction
Opslane connects to your Slack workspace and listens for incoming alerts. When it detects an alert, it will:
- Analyze the alert using AI
- Provide contextual information
- Suggest potential actions
- Respond in the message thread with insights
Setting up
Authorization
You must be an admin of the Slack workspace to set up the Opslane Slack bot.
- Go to https://api.slack.com/apps and sign in.
- Click the Create New App button in the top right.
- Select From an app manifest option.
- Choose your workspace from the dropdown and click Next.
- Select the “JSON” tab and paste the following manifest:
Replace xxx.ngrok.io
with your external facing URL.
{
"display_information": {
"name": "Opslane"
},
"features": {
"bot_user": {
"display_name": "Opslane",
"always_online": false
},
"slash_commands": [
{
"command": "/opslane",
"url": "https://xxx.ngrok.io/slack/events",
"description": "Opslane slash command",
"usage_hint": "[query]",
"should_escape": false
}
]
},
"oauth_config": {
"scopes": {
"bot": [
"app_mentions:read",
"channels:history",
"channels:read",
"chat:write",
"commands",
"files:write",
"groups:read",
"mpim:read",
"users:read"
]
}
},
"settings": {
"event_subscriptions": {
"request_url": "https://xxx.ngrok.io/slack/events",
"bot_events": [
"member_joined_channel",
"message.channels"
]
},
"interactivity": {
"is_enabled": true,
"request_url": "https://xxx.ngrok.io/slack/events"
},
"org_deploy_enabled": false,
"socket_mode_enabled": false,
"token_rotation_enabled": false
}
}
- Click Next, then Create.
- Under the Basic Information, click on
Show
for the Signing Secret and save it in your.env
file underSLACK_SIGNING_SECRET
.
- Navigate to OAuth & Permissions under the Features section.
- Click Install to Workspace and allow the app.
- Copy the Bot User OAuth Token and save it in
.env
and assign toSLACK_BOT_TOKEN
.
Configuring Opslane
- Update the follow env vars in
.env
:
SLACK_WORKSPACE=yourworkspace
SLACK_CHANNELS=alerts,dd-alerts
SLACK_WORKSPACE
refers to the workspace name of your Slack installation. SLACK_CHANNELS
refers to the channels
where you receive your alerts.
- Add the Opslane bot to the channel where you receive your alerts by inviting (@opslane) to those channels.