Under 10 minutes to get started

Quick Start Guide

Get CDCStream up and running in under 5 minutes. No complex configuration required.

1

Install CDCStream

30 sec

Install via pip or Docker

Using pip:
pip install py-cdcstream
Or using Docker:
docker pull cdcstream/cdcstream
2

Start the Server

10 sec

Launch CDCStream with one command

Using pip:
cdcstream start
Or using Docker:
docker run -p 5858:5858 cdcstream/cdcstream
3

Open Web UI

5 sec

Access the dashboard in your browser

http://localhost:5858
4

Database Setup

2 min

Configure your database for CDC (if needed)

PostgreSQL
PostgreSQL

Port: 5432

MySQL
MySQL

Port: 3306

MongoDB
MongoDB

Port: 27017

SQL Server
SQL Server

Port: 1433

See detailed setup guides for each database
5

Add Database Connection

1 min

Connect your PostgreSQL, MySQL, MongoDB, or MSSQL database

Host
Port
Database
Username
Password
6

Create Your First Alert

2 min

Select a table, define conditions, and choose notification channel

Slack
Email
Webhook
REST API

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}}.

Step-by-step guide

Create Your First Connection

Connect your database to CDCStream in just a few steps. Supports PostgreSQL, MySQL, SQL Server, and MongoDB.

1

Select Database Type

Choose your database engine from the supported options

PostgreSQL

Default port: 5432

MySQL

Default port: 3306

SQL Server

Default port: 1433

MongoDB

Default port: 27017

Click on a database card to select it, then click "Next" to continue.

2

Enter Connection Name

Give your connection a descriptive name for easy identification

# Example connection names:
production_postgres
staging_mysql
analytics_mongodb
orders_sqlserver

Use meaningful names like "production_orders" or "analytics_db" to easily identify connections later.

3

Configure Connection Details

Enter the database host, port, credentials, and database name

Host

Database server hostname or IP address (e.g., localhost, db.example.com)

Port

Database port (auto-filled based on database type)

Username

Database user with SELECT and TRIGGER permissions

Password

Database user password (click eye icon to show/hide)

Database

Name of the database to connect to

4

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.

5

SQL Server: Choose Authentication

SQL Server supports both SQL Server Authentication and Windows Authentication

SQL Server Auth

Use username and password credentials

Windows Auth

Use current Windows login credentials (no username/password needed)

Windows Authentication is useful when CDCStream runs on a domain-joined machine with appropriate permissions.

6

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-----...
SSH Host

Bastion/jump server hostname (e.g., bastion.example.com)

SSH Port

SSH port (default: 22)

SSH User

SSH username (e.g., ec2-user, ubuntu)

Auth Mode

Choose Password or Private Key authentication

SSH tunneling is available for PostgreSQL, MySQL, and SQL Server. Not available for MongoDB.

7

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.

8

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

Step-by-step guide

Create Your First Alert

Follow these steps to set up a database change alert with custom conditions and notifications

1

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.

2

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.

3

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.

4

Alert Details

Configure alert name, description, and log retention

Alert Name

Give your alert a descriptive name (e.g., "New Order Alert")

Description

Optional description of what this alert monitors

Log Retention

How many days to keep trigger logs (default: 30 days)

5

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.

Slack

Send to a Slack channel via webhook

Email (SMTP)

Send email notifications

Webhook

POST to any HTTP endpoint

REST API

Call external APIs with custom payloads

6

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 column

Each notification channel type (Slack, Email, Webhook, REST API) has its own message template editor.

7

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

Monitor Your Events

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

IDAlertStatusCreated
#1245New Order Alertsuccess2024-01-10 14:32:15
#1244User Registrationpartial2024-01-10 14:30:42
#1243Payment Receivedrule_rejected2024-01-10 14:28:03
#1242Inventory Updatefailed2024-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.

Understanding Trigger Logs

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

success

All 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

partial

Some 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

failed

All 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_rejected

Event 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_channels

Alert 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

Database Change
Rule Check
Send Notifications
Log Result

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.

Command Line Interface

CLI Commands

CDCStream comes with a powerful CLI for managing your server, checking status, and debugging.

🚀
cdcstream start

Start 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 -d
🛑
cdcstream stop

Stop CDCStream running in background

Options:

--port, -p(5858)- Port to stop
$ cdcstream stop$ cdcstream stop --port 8080
📊
cdcstream status

Show status of CDCStream services

Options:

--port, -p(5858)- Port to check
$ cdcstream status$ cdcstream status --port 8080
🗑️
cdcstream reset

Delete all data and start fresh

Options:

--force, -f(false)- Skip confirmation prompt
$ cdcstream reset$ cdcstream reset --force
📦
cdcstream version

Show installed version

$ cdcstream version
⚙️
cdcstream worker

Start only the CDC Worker (advanced)

$ cdcstream worker
🌐
cdcstream webserver

Start only the web server (no worker)

Options:

--port(5858)- Web server port
$ cdcstream webserver$ cdcstream webserver --port 3000
🔧
cdcstream triggers

Manage CDC triggers on database tables

Options:

datasource_id(required)- Datasource ID to manage
action(list)- list, sync, or remove
$ cdcstream triggers 1 list$ cdcstream triggers 1 sync$ cdcstream triggers 1 remove

Quick Reference

Start server on custom port

cdcstream start --port 8080

Run in background

cdcstream start -d

Check if running

cdcstream status

Stop background process

cdcstream stop

Fresh start (delete data)

cdcstream reset --force

Check version

cdcstream version

Default 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.