Quick Start Guide
Get CDCStream up and running in under 5 minutes. No complex configuration required.
Install CDCStream
30 secInstall via pip or Docker
pip install py-cdcstreamdocker pull cdcstream/cdcstreamStart the Server
10 secLaunch CDCStream with one command
cdcstream startdocker run -p 5858:5858 cdcstream/cdcstreamDatabase Setup
2 minConfigure your database for CDC (if needed)
Port: 5432
Port: 3306
Port: 27017
Port: 1433
Add Database Connection
1 minConnect your PostgreSQL, MySQL, MongoDB, or MSSQL database
Create Your First Alert
2 minSelect a table, define conditions, and choose notification channel
Done! Watch for Changes
🎉CDCStream will notify you when database changes match your rules
Your alert is now active and monitoring for changes!
Key Features
Auto-Installed Triggers
No manual database configuration needed. Triggers are automatically created when you set up alerts.
Advanced Rules
Define column conditions to control which events trigger alerts.
View Support
Monitor database views in addition to tables. CDCStream tracks the underlying base tables.
Log Retention
Automatic cleanup of old trigger logs based on configurable retention period (default: 30 days).
REST API
Full REST API for programmatic access. Integrate CDCStream with your existing systems.
Multi-Channel Notifications
Send alerts to Slack, Email (SMTP), Webhooks, or REST APIs. Use templates with {{placeholders}}.
Create Your First Connection
Connect your database to CDCStream in just a few steps. Supports PostgreSQL, MySQL, SQL Server, and MongoDB.
Select Database Type
Choose your database engine from the supported options
Default port: 5432
Default port: 3306
Default port: 1433
Default port: 27017
Click on a database card to select it, then click "Next" to continue.
Enter Connection Name
Give your connection a descriptive name for easy identification
# Example connection names:
production_postgres
staging_mysql
analytics_mongodb
orders_sqlserverUse meaningful names like "production_orders" or "analytics_db" to easily identify connections later.
Configure Connection Details
Enter the database host, port, credentials, and database name
Database server hostname or IP address (e.g., localhost, db.example.com)
Database port (auto-filled based on database type)
Database user with SELECT and TRIGGER permissions
Database user password (click eye icon to show/hide)
Name of the database to connect to
MongoDB: Choose Connection Method
For MongoDB, you can connect using a URI string or individual fields
# URI Mode (recommended for Atlas):
mongodb+srv://user:pass@cluster.mongodb.net/mydb
# Fields Mode:
Host: localhost
Port: 27017
Database: mydb⚠️ MongoDB requires a Replica Set or Sharded Cluster. Standalone MongoDB is not supported for change streams.
SQL Server: Choose Authentication
SQL Server supports both SQL Server Authentication and Windows Authentication
Use username and password credentials
Use current Windows login credentials (no username/password needed)
Windows Authentication is useful when CDCStream runs on a domain-joined machine with appropriate permissions.
Configure SSH Tunnel (Optional)
Connect through an SSH bastion host for secure access to databases in private networks
# SSH with Password:
SSH Host: bastion.example.com
SSH User: ubuntu
SSH Password: ********
# SSH with Private Key:
SSH Host: bastion.example.com
SSH User: ec2-user
Private Key: -----BEGIN PRIVATE KEY-----...Bastion/jump server hostname (e.g., bastion.example.com)
SSH port (default: 22)
SSH username (e.g., ec2-user, ubuntu)
Choose Password or Private Key authentication
SSH tunneling is available for PostgreSQL, MySQL, and SQL Server. Not available for MongoDB.
Test Connection
Click "Test Connection" to verify your settings before saving
CDCStream will attempt to connect to your database and verify that the provided credentials have the necessary permissions (SELECT, TRIGGER creation). A modal will show the connection status.
If the test shows "Missing Permissions", grant the required permissions to the database user and test again.
Save Connection
Click "Save" to store the connection and start using it
After a successful connection test, CDCStream will automatically save your connection and redirect you to the Connections page. You can now create alerts using this connection!
You can edit or delete connections anytime from the Connections page.
Required Permissions
The database user needs SELECT permission on tables you want to monitor, and TRIGGER permission to create change tracking triggers.
Auto-Detection
CDCStream automatically detects schemas, tables, and columns from your database. No manual configuration needed!
Multiple Connections
You can add multiple database connections and create alerts across different databases from a single CDCStream instance.
Edit Anytime
Connection settings can be updated anytime. Click the edit button on the Connections page to modify host, credentials, or other settings.
Database Setup Guides
Click on a database to see detailed setup instructions
Create Your First Alert
Follow these steps to set up a database change alert with custom conditions and notifications
Select Database Connection
Choose which database connection to monitor
Select from your configured database connections (PostgreSQL, MySQL, MongoDB, or SQL Server). If you haven't added one yet, go to Connections first.
Select Schema & Table
Choose the schema and table (or view) you want to monitor
CDCStream fetches the schema structure from your database. You can monitor regular tables or database views.
For views, CDCStream automatically detects and tracks the underlying base tables.
Configure Rules
Select columns to include and add conditions to define which changes trigger the alert
# Example: Only trigger for high-value orders
Column: amount
Operator: > (Greater Than)
Value: 1000
# Example: Only trigger for specific status
Column: status
Operator: Equals
Value: "pending"Rules are optional. Leave empty to trigger on ALL changes (INSERT, UPDATE, DELETE) to the selected table.
Alert Details
Configure alert name, description, and log retention
Give your alert a descriptive name (e.g., "New Order Alert")
Optional description of what this alert monitors
How many days to keep trigger logs (default: 30 days)
Select Notification Channel
Choose or create a notification channel for this alert
You can create a new channel directly from this screen or select an existing one.
Send to a Slack channel via webhook
Send email notifications
POST to any HTTP endpoint
Call external APIs with custom payloads
Customize Message Template
Define the notification message using placeholders
🔔 *{{operation}}* on `{{schema_name}}.{{table_name}}`
📦 Data: {{column_name}}{{operation}}→INSERT, UPDATE, or DELETE{{schema_name}}→Database schema name{{table_name}}→Table name{{column_name}}→Value of specific columnEach notification channel type (Slack, Email, Webhook, REST API) has its own message template editor.
Create Alert
Click "Create Alert" to save and activate
CDCStream will automatically install the necessary database triggers. Your alert starts monitoring immediately!
You can edit, pause/resume, or delete alerts anytime from the Alerts page.
Monitoring Views
When monitoring a view, CDCStream automatically tracks changes to the underlying base tables. This is useful for monitoring joined data.
Auto-Installed Triggers
CDCStream automatically creates database triggers when you save an alert. No manual SQL or database configuration required!
Advanced Rules
Combine multiple conditions with AND logic. For example: status = 'pending' AND amount > 1000 AND region = 'US'.
Multiple Channels
Create multiple alerts for the same table with different notification channels to send alerts to Slack, Email, and Webhooks simultaneously.
Notification Channels
Configure where to send your alerts
Trigger History
Track every database change captured by CDCStream. View event details, notification results, and debug issues.
View All Events
See every database change captured by your alerts in chronological order
The Trigger History page shows all events with ID, Rule name, Status, and Timestamp. Events are sorted by newest first.
Status Indicators
Quickly identify successful, failed, or rejected events
Color-coded status badges: Green for success, Yellow for partial, Red for failed, Gray for rejected.
View by Alert
View events for a specific alert only
Select a specific alert to see its trigger logs. Useful for debugging and monitoring individual alerts.
Event Details
Click on an event to see the full payload and dispatch results
Each log includes the original event data, which notification channels were triggered, and the response from each channel.
Dashboard Summary
See recent triggers on the main dashboard for quick overview
The home page shows the last 5 trigger events for each alert as colored dots. Hover to see status and timestamp.
Log Retention
Old logs are automatically cleaned up based on retention settings
By default, trigger logs older than 30 days are automatically deleted. Configure retention in settings.
Example Trigger Logs
| ID | Alert | Status | Created |
|---|---|---|---|
| #1245 | New Order Alert | success | 2024-01-10 14:32:15 |
| #1244 | User Registration | partial | 2024-01-10 14:30:42 |
| #1243 | Payment Received | rule_rejected | 2024-01-10 14:28:03 |
| #1242 | Inventory Update | failed | 2024-01-10 14:25:18 |
Debugging Tips
Check the dispatch_results field to see exactly which notification channels succeeded or failed. Error messages include details about what went wrong.
Performance Monitoring
Use the Trigger History to monitor alert performance. High volumes of rule_rejected events might indicate overly broad table monitoring or rules that need refinement.
Event Types & Status
Every database change is logged with a status indicating what happened. Understanding these statuses helps you debug and optimize your alerts.
Success
successAll notifications were sent successfully
The database change matched the alert conditions, and all configured notification channels (Slack, Email, Webhook, REST API) received the notification successfully.
Partial
partialSome notifications succeeded, some failed
The alert matched but not all notification channels received the message. For example, Slack succeeded but Email failed. Check the dispatch_results for details on which channels failed.
Failed
failedAll notifications failed to send
The alert matched but all notification channels failed. Common causes: invalid webhook URL, SMTP server unreachable, API endpoint down, or authentication errors.
Rule Rejected
rule_rejectedEvent did not pass the rule conditions
The database change occurred on the monitored table, but it did not match the rule conditions. For example, you set a rule for "status = pending" but the actual value was "completed".
No Channels
no_channelsAlert matched but no notification channels configured
The database change matched all alert conditions, but there are no notification channels configured for this alert. Add a Slack, Email, Webhook, or REST API channel to receive notifications.
Event Processing Flow
Events can be rejected at Rule Check (rule_rejected) stage if they don't match the conditions. If they pass, notifications are sent and the result (success, partial, failed) is logged.
CLI Commands
CDCStream comes with a powerful CLI for managing your server, checking status, and debugging.
cdcstream startStart CDCStream server
Options:
--port, -p(5858)- Web server port--daemon, -d(false)- Run in background (detached mode)$ cdcstream start$ cdcstream start --port 8080$ cdcstream start -p 8080 -dcdcstream stopStop CDCStream running in background
Options:
--port, -p(5858)- Port to stop$ cdcstream stop$ cdcstream stop --port 8080cdcstream statusShow status of CDCStream services
Options:
--port, -p(5858)- Port to check$ cdcstream status$ cdcstream status --port 8080cdcstream resetDelete all data and start fresh
Options:
--force, -f(false)- Skip confirmation prompt$ cdcstream reset$ cdcstream reset --forcecdcstream versionShow installed version
$ cdcstream versioncdcstream workerStart only the CDC Worker (advanced)
$ cdcstream workercdcstream webserverStart only the web server (no worker)
Options:
--port(5858)- Web server port$ cdcstream webserver$ cdcstream webserver --port 3000cdcstream triggersManage CDC triggers on database tables
Options:
datasource_id(required)- Datasource ID to manageaction(list)- list, sync, or remove$ cdcstream triggers 1 list$ cdcstream triggers 1 sync$ cdcstream triggers 1 removeQuick Reference
Start server on custom port
cdcstream start --port 8080Run in background
cdcstream start -dCheck if running
cdcstream statusStop background process
cdcstream stopFresh start (delete data)
cdcstream reset --forceCheck version
cdcstream versionDefault Behavior
Running cdcstream start without arguments starts the server on port 5858 in foreground mode. Press Ctrl+C to stop.
Data Persistence
Your connections and alerts are stored in ~/db.sqlite3. Uninstalling CDCStream does not delete this file. Use cdcstream reset for a fresh start.