monitoring_slack
No security coverage
About
Monitoring Slack sends Monitoring sensor status change notifications to a Slack channel via an incoming webhook.
Drop-in replacement / companion for the monitoring_mail submodule for teams that live in Slack rather than email.
Features
- Posts a notification whenever a sensor transitions between runs (for example
OK → WARNING). Cached results are skipped. - Per-severity filtering — choose which status changes are worth notifying about (OK, INFO, WARNING, CRITICAL, UNKNOWN).
- Messages are sent as Slack attachments with a color derived from the new status (
good/warning/danger) and a status emoji prepended to the title for visual prominence. - Each attachment includes the sensor label, the sensor message, the old → new status transition, the sensor value and a link back to the sensor details page in Drupal.
- Optional payload overrides for channel, bot display name and icon emoji (legacy webhooks only — modern Slack app webhooks ignore these).
- "Send test notification" button on the settings form to verify a webhook URL before saving.
- Drupal 10.6 and 11 compatible — uses OOP
#[Hook]attributes on Drupal 11, with#[LegacyHook]stubs for Drupal 10.6.
Requirements
- Drupal 10.6 or 11.
- Monitoring module.
- A Slack incoming webhook URL. Create one at https://api.slack.com/messaging/webhooks.
Configuration
- Install and enable the module.
- Go to Configuration → System → Monitoring settings (
/admin/config/system/monitoring). - In the Slack notifications section, paste your webhook URL and tick the severities that should trigger a notification.
- Optionally set a channel override, bot display name and icon emoji.
- Click Send test notification to verify the webhook works.
- Save.
Notes
- If Monitoring's call logging is disabled (Monitoring settings → Log calls: none) no notifications are triggered, because transitions cannot be detected.
- Channel / username / icon overrides are only honored by legacy incoming webhooks. Webhooks created through a modern Slack App always post as the app and to the channel configured in Slack — leave those fields empty in that case, and configure the app's display name and icon in Slack instead.