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
- Navigate to the DB24x7 dashboard and go to Settings → Integrations
- Click on the "Connect to Slack" button
- Authorize DB24x7 to access your Slack workspace
- Select the channels where you want to receive notifications
Step 2: Configure Permissions
DB24x7 requires the following Slack permissions:
chat:writeSend messages to channelscommandsEnable slash commandsincoming-webhookPost messages via webhookschannels:readView channel informationConfiguring 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 statusGeneralGet current health status of all monitored databases
/db24x7 queries [database]PerformanceShow top slow queries for a specific database
/db24x7 metrics [database]MonitoringDisplay current CPU, memory, and connection metrics
/db24x7 optimize [query-id]OptimizationRequest optimization suggestions for a specific query
/db24x7 incidentsIncidentsList active incidents and their resolution status
/db24x7 helpHelpDisplay 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:
Slack Shortcuts
Use Slack shortcuts to quickly access DB24x7 features:
Schedule downtime and silence alerts
⚡ MaintenanceTrigger immediate database health scan
⚡ Health CheckExample 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