Documentation

Everything you need to set up dbaBrain and get Sage analyzing your PostgreSQL databases.

Quick Start

Get dbaBrain connected to your first database in under 2 minutes.

1.

Create a monitoring user on your PostgreSQL server

CREATE USER dbabrain_monitor WITH PASSWORD 'your-secure-password';
GRANT pg_monitor TO dbabrain_monitor;
GRANT USAGE ON SCHEMA public TO dbabrain_monitor;
2.

Sign up at dbabrain.ai and add your database connection

3.

Sage scans your environment and delivers your first health report

How Sage Analyzes Your Database

Sage is not a traditional monitoring tool. Traditional tools collect metrics and display them on dashboards. Sage collects metrics, builds a context model of your environment, and uses AI to interpret what is happening and why.

What Sage Collects

When you connect a database, Sage collects:

  • Performance metrics - connections, QPS, cache hit ratio, replication lag, dead tuples, bloat, checkpoint timing, WAL generation
  • Active sessions - what queries are running, how long, what locks they hold
  • Configuration - postgresql.conf diff from defaults, pg_hba.conf rules, installed extensions
  • Schema - tables, indexes, foreign keys, approximate row counts, bloat estimates
  • Replication - topology, lag per standby, slot status
  • Query patterns - top queries by time from pg_stat_statements

The Context Model

Sage builds a living model of your database that includes baselines (what is normal for your workload at different times of day), change history (when configurations changed and what the impact was), and pattern recognition (this issue happened before, here is how it was resolved).

Root Cause Analysis

When Sage detects an anomaly, it uses the 5 Whys methodology to trace the chain from symptom to root cause. For example:

Why is CPU high?
Because autovacuum is running aggressively
Why is autovacuum aggressive?
Because orders table has 12M dead tuples
Why so many dead tuples?
Nightly batch updates 500K rows without intermediate commits
Why can't vacuum keep up?
Idle-in-transaction session holding snapshot for 4 hours
Root cause: Application bug - missing commit/rollback
Fix: pg_terminate_backend(28471) + set idle_in_transaction_session_timeout

All Documentation