Skip to main content

Slack

If you want to enable Slack, provide either a webhook URL or a bot token with channel.

Webhook mode:

ParameterDescriptionRequired
alert.slack.webhookSlack webhook URLYes
alert.slack.channel๐Ÿ“ข Override channelNo
alert.slack.titleโœ๏ธ Custom titleNo
alert.slack.textโœ๏ธ Custom textNo
alert.slack.compact๐Ÿ“ Single-line modeNo

Bot Token mode:

ParameterDescriptionRequired
alert.slack.tokenSlack bot token (xoxb-...)Yes
alert.slack.channel๐Ÿ“ข Channel to post toYes
alert.slack.titleโœ๏ธ Custom titleNo
alert.slack.textโœ๏ธ Custom textNo
alert.slack.compact๐Ÿ“ Single-line modeNo

๐Ÿ’ก Pro tip: When using bot token mode, alerts become threaded conversations โ€” root message on first alert, updates as replies. Clean and organized! ๐Ÿงน

Compact modeโ€‹

alert:
slack:
webhook: "https://hooks.slack.com/..."
compact: true

Routing & Retryโ€‹

alert:
slack:
webhook: "https://hooks.slack.com/..."
routes:
- namespaces: ["production"]
severities: ["high", "critical"]
retry:
maxAttempts: 3
delay: 5s

Fallback providerโ€‹

alert:
slack:
webhook: "https://hooks.slack.com/..."
fallback: "pagerduty"
retry:
maxAttempts: 3

Example (Webhook)โ€‹

apiVersion: v1
kind: Namespace
metadata:
name: kwatch
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kwatch
namespace: kwatch
data:
config.yaml: |
alert:
slack:
webhook: WEBHOOK_URL
title: "optional customized title"
text: "optional customized text"

Example (Bot Token)โ€‹

apiVersion: v1
kind: Namespace
metadata:
name: kwatch
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kwatch
namespace: kwatch
data:
config.yaml: |
alert:
slack:
token: xoxb-your-token
channel: "#alerts"
title: "optional customized title"
text: "optional customized text"

Screenshotโ€‹

Slack notification screenshot