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:Core Tables
users
User authentication and profile information.- Passwords hashed with bcrypt
- Email uniqueness enforced
- No RLS (public table for authentication)
user_tokens
Cloud provider OAuth tokens and credentials.gcp: Google Cloud Platformaws: Amazon Web Servicesazure: Microsoft Azuregithub: GitHubslack: Slackgrafana,datadog,pagerduty: Monitoring platforms
- 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.active: Session in progresscompleted: Session finishedcancelled: User cancelledin_progress: Background task running
incidents
Incident tracking for RCA (Root Cause Analysis).investigating: Active investigationanalyzed: Analysis completeresolved: Issue resolvedmerged: Merged into another incident
idle: Not analyzingrunning: Analysis in progresscomplete: Analysis finishederror: Analysis failed
grafana,datadog,netdata,pagerduty,splunk,dynatrace,bigpanda,jenkins,cloudbees
incident_thoughts
Streaming analysis thoughts during RCA.analysis: Analytical reasoninghypothesis: Proposed causeevidence: Supporting dataconclusion: Final determination
incident_suggestions
Actionable suggestions from RCA.diagnostic: Information gatheringfix: Code or configuration changemitigation: Temporary fixinvestigation: Further analysis needed
safe: No impact (read-only)medium: May affect resourceshigh: Destructive or expensive
incident_citations
Tool execution results referenced in analysis.- Citation key:
[1] - Referenced in thoughts: “The pod is failing [1] due to resource limits”
incident_alerts
Correlated alerts merged into an incident.time_window: Alerts within time windowservice_match: Same service affectedsemantic: Similar alert descriptionsmanual: User-initiated merge
llm_usage_tracking
LLM API usage and cost tracking.total_tokens: Sum of input + output tokenssurcharge_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:chat_sessionsincidentsincident_alertsuser_tokensuser_preferencesllm_usage_trackingk8s_*(all Kubernetes tables)*_alerts(all monitoring tables)
Migrations
Database schema is managed viainitialize_tables() in server/utils/db/db_utils.py:
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
-
Use JSONB operators for efficient JSON queries:
-
Limit result sets with pagination:
-
Use partial indexes for filtered queries: