Back to Documentation

Slack Integration

Get real-time database alerts, notifications, and insights directly in your Slack workspace.

Overview

The DB24x7 Slack integration enables your team to receive database alerts, monitor performance metrics, and interact with your AI DBA directly from Slack. Stay informed about critical issues without leaving your communication hub.

Real-time Alerts

Receive instant notifications for critical database events

Interactive Commands

Query database status and metrics using slash commands

Setting Up the Slack App

Step 1: Install from Slack App Directory

  1. Navigate to the DB24x7 dashboard and go to Settings → Integrations
  2. Click on the "Connect to Slack" button
  3. Authorize DB24x7 to access your Slack workspace
  4. Select the channels where you want to receive notifications

Step 2: Configure Permissions

DB24x7 requires the following Slack permissions:

chat:writeSend messages to channels
commandsEnable slash commands
incoming-webhookPost messages via webhooks
channels:readView channel information

Configuring Alert Channels

Route different types of alerts to specific Slack channels based on severity and category.

Alert Types

Critical Alerts

Database downtime, connection failures, disk space critical

Warning Alerts

High CPU usage, slow queries, memory pressure

Info Notifications

Optimization completed, backup finished, health check passed

Channel Configuration Example

{
  "channels": {
    "critical": "#db-alerts-critical",
    "warning": "#db-alerts-warning",
    "info": "#db-notifications",
    "optimization": "#db-insights"
  },
  "notify_users": {
    "critical": ["@oncall", "@dba-team"],
    "warning": ["@dba-team"]
  },
  "quiet_hours": {
    "enabled": true,
    "start": "22:00",
    "end": "07:00",
    "timezone": "America/New_York"
  }
}

Interactive Commands

Use slash commands to interact with DB24x7 directly from Slack.

/db24x7 statusGeneral

Get current health status of all monitored databases

/db24x7 queries [database]Performance

Show top slow queries for a specific database

/db24x7 metrics [database]Monitoring

Display current CPU, memory, and connection metrics

/db24x7 optimize [query-id]Optimization

Request optimization suggestions for a specific query

/db24x7 incidentsIncidents

List active incidents and their resolution status

/db24x7 helpHelp

Display all available commands and their usage

Workflow Triggers

Automate database operations by triggering workflows from Slack using interactive buttons and shortcuts.

Interactive Buttons

Critical alerts include action buttons for quick response:

Automatically apply AI-recommended solution
Open full incident report in dashboard
Temporarily silence notifications
Create PagerDuty incident

Slack Shortcuts

Use Slack shortcuts to quickly access DB24x7 features:

Create Maintenance Window

Schedule downtime and silence alerts

⚡ Maintenance
Run Health Check

Trigger immediate database health scan

⚡ Health Check

Example Alert Message

🔴 Critical: High CPU Usage Detected

Database: production-postgres-01
CPU Usage: 95% (threshold: 80%)
Duration: 5 minutes
Suggested Fix: Terminate long-running query (ID: 12345)

Best Practices

Recommended Setup

  • Use separate channels for different severity levels
  • Configure quiet hours to avoid alert fatigue during off-hours
  • Set up user groups (@dba-team, @oncall) for targeted notifications
  • Enable thread replies to keep discussions organized
  • Use private channels for sensitive production alerts

Common Pitfalls

  • Avoid sending all alerts to a single channel (alert fatigue)
  • Don't disable critical alerts during business hours
  • Ensure the bot has permission to post in configured channels
  • Review and update alert thresholds regularly

Troubleshooting

Not receiving alerts?

  • Verify the DB24x7 app is installed in your workspace
  • Check that the bot has been invited to the alert channel
  • Confirm alert routing configuration in DB24x7 dashboard
  • Review quiet hours settings

Slash commands not working?

  • Ensure you're using the correct command syntax
  • Verify your Slack user has DB24x7 access permissions
  • Check if the integration is still authorized
  • Try reconnecting the integration from dashboard

Interactive buttons not responding?

  • Confirm your user has appropriate DB24x7 role permissions
  • Check if the incident is still active
  • Verify network connectivity between Slack and DB24x7
  • Review audit logs for error messages

Next Steps