Docs
Direct PostgreSQL Connection
Connect dbaBrain directly to your PostgreSQL instance.
Connection Parameters
You need the following to connect:
- -Host - hostname or IP address of your PostgreSQL server
- -Port - typically 5432
- -Database - the database name to monitor
- -Username - the monitoring user (see Creating a Monitoring User)
- -Password - the monitoring user password
SSL Configuration
dbaBrain supports SSL connections. For most cloud providers, SSL is enabled by default. You can configure:
- -SSL Mode: disable, allow, prefer, require, verify-ca, verify-full
- -CA Certificate: upload your custom CA certificate for verify-ca/verify-full modes
- -Client Certificate: for mutual TLS authentication
- -Client Key: private key for client certificate
Connection String Format
textpostgresql://dbabrain_monitor:<YOUR_PASSWORD>@<YOUR_HOST>:5432/<YOUR_DATABASE>?sslmode=require
Testing the Connection
Before adding to dbaBrain, verify the connection works from your local machine:
bashpsql -h your-host -p 5432 -U dbabrain_monitor -d your-database -c "SELECT version();"
Firewall Rules
Ensure your firewall allows inbound TCP connections on port 5432 (or your custom port) from dbaBrain cloud IPs. For self-hosted PostgreSQL, update pg_hba.conf:
text# pg_hba.conf - allow dbaBrain monitoring user host all dbabrain_monitor 0.0.0.0/0 scram-sha-256
Replace 0.0.0.0/0 with the specific dbaBrain IP range in production. Contact support for current IP ranges.