Docs

The Context Model Explained

How dbaBrain maintains a living model of your database environment.

What is the Context Model?

The context model is a continuously updated representation of your entire database environment. It goes beyond simple metrics to include configuration, topology, schedules, patterns, and history.

Components

  • -Infrastructure: server specs, OS, cloud provider, region, disk type
  • -PostgreSQL config: all non-default settings, pg_hba.conf rules, extensions
  • -Schema: tables, indexes (including unused/invalid), foreign keys, sizes
  • -Replication: primary/standby roles, lag history, slot status
  • -Scheduled operations: crontab, pg_cron, backup schedules, maintenance windows
  • -Baselines: normal TPS, connection count, cache ratio by time of day
  • -Incident history: past issues, how they were resolved, recurrence patterns

Why Context Matters

Without context, a monitoring tool can only tell you "CPU is at 80%." With context, Sage knows that 80% CPU at 2am on a Tuesday is unusual (your baseline is 20%), but 80% CPU at 1am on the first of the month is expected (your monthly batch job runs then). Context eliminates false positives and enables accurate root cause analysis.

Baseline Learning

Sage builds baselines automatically over the first 7 days of monitoring. It learns your workload patterns by hour of day, day of week, and identifies recurring events (backups, batch jobs, peak traffic). After the baseline period, anomaly detection activates.