Slack¶
Standard Slack incoming webhook. The lowest-friction channel to set up.
Get a webhook URL¶
- Go to api.slack.com/messaging/webhooks.
- Create or pick a Slack app, enable Incoming Webhooks, add one for the target channel.
- Copy the URL:
https://hooks.slack.com/services/T0XXX/B0XXX/xxxxxx.
Configure¶
ConfigMap:
Secret:
kubectl -n kpulse edit secret kpulse-secrets
# under stringData add:
# SLACK_WEBHOOK_URL: https://hooks.slack.com/services/T0/B0/xxx
Apply:
Test¶
kubectl -n kpulse port-forward svc/kpulse 8080:8080 &
curl 'http://localhost:8080/test-channel?name=slack'
Message format¶
What kpulse sends to Slack (raw):
:rotating_light: *[prod-eks-1]* `checkout/pod/api-7d9f` OOMKilled on api-7d9f/server
Container server in pod checkout/api-7d9f is in state OOMKilled
What Slack renders:
đ¨ [prod-eks-1]
checkout/pod/api-7d9fOOMKilled on api-7d9f/server Container server in pod checkout/api-7d9f is in state OOMKilled
Severity emoji:
| Severity | Slack code | Renders as |
|---|---|---|
| info | :information_source: |
âšī¸ |
| warning | :warning: |
â ī¸ |
| critical | :rotating_light: |
đ¨ |