Slack¶
rlwatch posts alerts to Slack via incoming webhooks. The webhook URL is the only required setting.
Setup¶
- Create an incoming webhook in your Slack workspace: Apps → Incoming Webhooks → Add to Slack.
- Copy the webhook URL (looks like
https://hooks.slack.com/services/T.../B.../...). - Configure rlwatch one of two ways:
Environment variable (recommended for CI/CD):
rlwatch.yaml:
You don't need to set enabled: true explicitly — rlwatch flips the flag automatically when the webhook URL is set.
Payload format¶
Each alert becomes a Slack message with block kit blocks:
- Header with severity emoji (
🚨for critical,⚠️for warning) and detector name - Section with run id and step
- Section with the alert message
- Section with the recommended action
- Section with up to 10 metric values from the alert
Mentioning users¶
mention_users takes Slack member IDs (the ones that look like U...), not display names. You can find a member ID by clicking a user's profile and copying it from "More → Copy member ID".
Failure handling¶
If the webhook returns a non-200, the failure is logged at error level. If the connection fails, the failure is logged. Either way, training is not interrupted — Slack delivery runs in a daemon thread and exceptions are caught.