This guide explains how to create and configure a Slack app for Tarka to enable alert notifications and inbound chat.
- Notifications: Tarka posts triage reports to a Slack channel when an alert is classified as
actionableorinformational. - Inbound chat: Mention
@tarkain a thread (or DM it) to ask follow-up questions about an investigation.
- Slack workspace admin access (to create and install an app)
- A running Tarka deployment to configure with the resulting credentials
- Go to api.slack.com/apps and click Create New App → From scratch.
- Name it
Tarka(ortarka-<your-cluster>) and select your workspace. - Click Create App.
Tarka uses Socket Mode (WebSocket), so no public HTTP endpoint is required.
- Go to Settings → Socket Mode and toggle Enable Socket Mode ON.
- When prompted, name the app-level token (e.g.
tarka-socket) and click Generate. - Copy the
xapp-...token — this is yourSLACK_APP_TOKEN.
Go to Features → OAuth & Permissions → Scopes → Bot Token Scopes and add:
| Scope | Purpose |
|---|---|
app_mentions:read |
Receive @tarka mentions in channels |
chat:write |
Post messages and thread replies |
channels:read |
Resolve channel IDs |
users:read |
Read user profile information |
reactions:write |
Add emoji reactions for in-progress feedback |
- Go to Features → Event Subscriptions and toggle Enable Events ON.
- Under Subscribe to bot events, add:
app_mention— triggered when someone@tarkas in a channelmessage.channels— triggered on messages in public channels (required for thread replies without @mention)message.im— triggered on direct messages to the bot
- No Request URL is needed — Socket Mode handles delivery.
Give Tarka its identity in Slack — this can't be done via the API and must be configured in the app settings.
- Go to Basic Information → Display Information.
- Set App name to
Tarka. - Under App icon & Preview, upload the Tarka robot icon (the blue robot on a light-blue circle background — export it from the UI or use the image from the Tarka console).
- Optionally set a Background color to match Tarka's brand blue (
#135BEC). - Click Save Changes.
The bot name color shown in Slack messages (like the purple in incident.io) is derived from the app's accent color set here.
- Go to Settings → Install App and click Install to Workspace → Allow.
- Copy the Bot User OAuth Token (
xoxb-...) — this is yourSLACK_BOT_TOKEN.
Add the following to your deployment:
# Required for notifications
SLACK_BOT_TOKEN=xoxb-...
SLACK_DEFAULT_CHANNEL=#sre-alerts # default channel for alert notifications
# Required for inbound chat (@tarka mentions and DMs)
SLACK_APP_TOKEN=xapp-...Both features auto-enable when the relevant variables are present — no extra feature flags needed.
apiVersion: v1
kind: Secret
metadata:
name: tarka-slack
namespace: tarka
type: Opaque
stringData:
bot-token: "xoxb-..."
app-token: "xapp-..."# In your Deployment spec
env:
- name: SLACK_BOT_TOKEN
valueFrom:
secretKeyRef:
name: tarka-slack
key: bot-token
- name: SLACK_APP_TOKEN
valueFrom:
secretKeyRef:
name: tarka-slack
key: app-token
- name: SLACK_DEFAULT_CHANNEL
value: "#sre-alerts"Individual Prometheus alerts can override the default channel by adding a slack_channel label:
# In your Prometheus alert rule
labels:
slack_channel: "#platform-alerts"- Only alerts classified as
actionableorinformationaltrigger notifications.noisyandartifactalerts are silently skipped. - If PostgreSQL is configured, Tarka stores thread mappings so that chat replies in a notification thread are scoped to the correct investigation.
- The bot must be invited to any private channel it should post in (
/invite @tarka).
- Verify
SLACK_BOT_TOKENandSLACK_DEFAULT_CHANNELare set. - Confirm the bot is a member of the channel (invite it with
/invite @tarka). - Check Tarka logs for
slackerrors on alert completion.
- Verify
SLACK_APP_TOKENis set and Socket Mode is enabled in the app settings. - Confirm the
app_mention,message.channels, andmessage.imevents are subscribed. - Check Tarka logs for
SocketModeHandlerstartup messages.
- The
message.channelsevent subscription is required for thread replies in channels. Add it under Features → Event Subscriptions → Subscribe to bot events and reinstall the app.
- The
channels:readscope is required to resolve channel names to IDs. Confirm it is added and the app is reinstalled after any scope changes.
- Store tokens in Kubernetes Secrets, not ConfigMaps or environment variable literals.
- Rotate tokens if they are accidentally exposed (revoke and regenerate in the app settings).
- Restrict the bot to only the channels it needs — do not add it to every channel by default.