Slack
If you want to enable Slack, provide either a webhook URL or a bot token with channel.
Webhook mode:
| Parameter | Description | Required |
|---|---|---|
alert.slack.webhook | Slack webhook URL | Yes |
alert.slack.channel | ๐ข Override channel | No |
alert.slack.title | โ๏ธ Custom title | No |
alert.slack.text | โ๏ธ Custom text | No |
alert.slack.compact | ๐ Single-line mode | No |
Bot Token mode:
| Parameter | Description | Required |
|---|---|---|
alert.slack.token | Slack bot token (xoxb-...) | Yes |
alert.slack.channel | ๐ข Channel to post to | Yes |
alert.slack.title | โ๏ธ Custom title | No |
alert.slack.text | โ๏ธ Custom text | No |
alert.slack.compact | ๐ Single-line mode | No |
๐ก 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โ
