Skip to main content

Overview

Aurora uses PostgreSQL as its primary database with Row-Level Security (RLS) policies for multi-tenant data isolation. The schema is organized into several domains:
  • Authentication & Users: User accounts and preferences
  • Chat & Sessions: Chat history and session management
  • Incidents & RCA: Incident tracking and root cause analysis
  • Cloud Resources: Kubernetes, cloud provider data
  • Monitoring: Alerts from Grafana, Datadog, PagerDuty, etc.
  • Integrations: GitHub, Slack, Jenkins, etc.

Connection Details

Environment Variables:
Connection String:

Core Tables

users

User authentication and profile information.
Security:
  • Passwords hashed with bcrypt
  • Email uniqueness enforced
  • No RLS (public table for authentication)

user_tokens

Cloud provider OAuth tokens and credentials.
Providers:
  • gcp: Google Cloud Platform
  • aws: Amazon Web Services
  • azure: Microsoft Azure
  • github: GitHub
  • slack: Slack
  • grafana, datadog, pagerduty: Monitoring platforms
Security:
  • Sensitive data stored in Vault (referenced by secret_ref)
  • RLS enabled (users can only access their own tokens)

chat_sessions

Chat conversation history and state.
Message Format (JSONB):
UI State (JSONB):
Status Values:
  • active: Session in progress
  • completed: Session finished
  • cancelled: User cancelled
  • in_progress: Background task running

incidents

Incident tracking for RCA (Root Cause Analysis).
Status Values:
  • investigating: Active investigation
  • analyzed: Analysis complete
  • resolved: Issue resolved
  • merged: Merged into another incident
Aurora Status:
  • idle: Not analyzing
  • running: Analysis in progress
  • complete: Analysis finished
  • error: Analysis failed
Source Types:
  • grafana, datadog, netdata, pagerduty, splunk, dynatrace, bigpanda, jenkins, cloudbees

incident_thoughts

Streaming analysis thoughts during RCA.
Thought Types:
  • analysis: Analytical reasoning
  • hypothesis: Proposed cause
  • evidence: Supporting data
  • conclusion: Final determination

incident_suggestions

Actionable suggestions from RCA.
Suggestion Types:
  • diagnostic: Information gathering
  • fix: Code or configuration change
  • mitigation: Temporary fix
  • investigation: Further analysis needed
Risk Levels:
  • safe: No impact (read-only)
  • medium: May affect resources
  • high: Destructive or expensive

incident_citations

Tool execution results referenced in analysis.
Example:
  • Citation key: [1]
  • Referenced in thoughts: “The pod is failing [1] due to resource limits”

incident_alerts

Correlated alerts merged into an incident.
Correlation Strategies:
  • time_window: Alerts within time window
  • service_match: Same service affected
  • semantic: Similar alert descriptions
  • manual: User-initiated merge

llm_usage_tracking

LLM API usage and cost tracking.
Computed Columns:
  • total_tokens: Sum of input + output tokens
  • surcharge_amount: Platform markup (30% default)
  • total_cost_with_surcharge: Final cost to user

Kubernetes Tables

k8s_pods

k8s_nodes

k8s_services, k8s_deployments, k8s_ingresses

Similar structure for other Kubernetes resources.

Monitoring Tables

grafana_alerts

datadog_events, pagerduty_events, netdata_alerts, splunk_alerts

Similar structure for other monitoring platforms.

Row-Level Security (RLS)

Aurora uses PostgreSQL RLS for multi-tenant data isolation:
Setting User Context:
Protected Tables (RLS Enabled):
  • chat_sessions
  • incidents
  • incident_alerts
  • user_tokens
  • user_preferences
  • llm_usage_tracking
  • k8s_* (all Kubernetes tables)
  • *_alerts (all monitoring tables)

Migrations

Database schema is managed via initialize_tables() in server/utils/db/db_utils.py:
Run Migrations:

Connection Pooling

Aurora uses a custom connection pool for efficient database access:

Backup and Recovery

Backup

Restore

Performance Optimization

Indexes

Key indexes for performance:

Query Optimization

  1. Use JSONB operators for efficient JSON queries:
  2. Limit result sets with pagination:
  3. Use partial indexes for filtered queries:

Monitoring

Query Statistics

Connection Monitoring