Appearance
Dashboards & Analytics
GhostAI provides comprehensive dashboards for monitoring PII protection, compliance, and business metrics.
Available Dashboards
| Dashboard | Purpose | Access |
|---|---|---|
| Analytics | PII detection patterns and trends | All users |
| Executive | Board-ready reports, cost avoidance | Admin+ |
| Metrics | Business KPIs, MRR, conversion | Admin+ |
| Usage | Quotas, API usage tracking | All users |
| Detection Accuracy | False positive rates, tuning | Admin+ |
| Observer / Growth | Platform adoption and growth metrics | Observer role or share link |
| AI Protection | AI-powered PII detection policy and metrics | Org admins |
| SIEM Health | SIEM delivery success rate, latency, error trends, gap detection | Admin+ |
| PII Dashboard | Detection rates, SLA tracking, and entity inventory (Overview / SLA / Inventory sub-views) | Admin+ (PII Dashboard) |
Analytics Dashboard
Overview Metrics
- Total PII Protected: Lifetime count of detected items
- Sessions: Number of conversations
- Messages Processed: Total messages scanned
- Protection Rate: Percentage with PII detected
Charts & Visualizations
PII by Entity Type
PERSON ████████████████████ 35%
EMAIL ██████████████ 24%
PHONE ████████████ 20%
US_SSN ███████ 12%
CREDIT_CARD █████ 9%Detection Trend (30 days)
│
500 │ ╭────────╮
│ ╱ ╲ ╭──
250 │──╯ ╲──────╯
│
0 └─────────────────────────────
Day 1 Day 30Compliance Distribution
┌─────────┬────────┬────────┬────────┐
│ HIPAA │ PCI-DSS│ GDPR │ SOX │
│ 42% │ 28% │ 20% │ 10% │
└─────────┴────────┴────────┴────────┘Filters
- Date Range: Custom, 7d, 30d, 90d, YTD
- Entity Type: Filter by specific types
- User: Filter by user (admin only)
- Session: Filter by conversation
Executive Dashboard
Hero Metrics
| Metric | Description |
|---|---|
| Cost Avoided | Estimated breach cost savings |
| PII Protected | Total items protected |
| Compliance Score | 0-100 organizational score |
Financial Risk Exposure
The Financial Risk Exposure card quantifies the dollar-value risk of detected PII in board-ready terms.
| Metric | Description |
|---|---|
| Records at Risk | Total PII records detected across all sessions |
| Gross Exposure | Records × industry-specific per-record cost (e.g., $120 for Financial, $150 for Healthcare) |
| Breach-Adjusted Risk | Gross exposure × 10% breach probability — the risk-weighted estimate |
| High-Risk Records | Count and percentage of high-sensitivity entity types (SSN, credit card, passport, bank account, secrets, medical PHI) |
The per-record cost is determined by the organization's industry vertical using VERTICAL_BASE_COSTS:
| Vertical | Cost per Record |
|---|---|
| Healthcare | $150 |
| Financial | $120 |
| Legal | $130 |
| Government | $140 |
| Technology | $100 |
| Default | $100 |
Compliance Score
The compliance score is a 0-100 metric that measures how fully your organization has configured the security and compliance features available in GhostAI. It appears in the Admin Dashboard header alongside a letter grade.
Scoring Categories
| Category | Max Points | How Points Are Earned |
|---|---|---|
| SSO Configuration | 25 (+5 bonus) | 25 points for configuring SAML SSO; +5 bonus if SSO enforcement is enabled |
| Data Residency | 15 | 15 points for a custom region; 10 points for the default region (US East); 0 if not configured |
| Multiple Admins | 10 | 10 points if 2+ accepted admins/owners; 5 points for a single admin |
| PII Protection | 25 | Always awarded — PII protection is always enabled |
| Audit Logging | 25 | Always awarded — audit logging is always enabled |
Because PII protection and audit logging are always on and every organization has at least one admin, the baseline score for any organization is 55.
Grade Scale
| Score | Grade | Level | Description |
|---|---|---|---|
| 90–100 | A | Excellent | Meets enterprise compliance requirements |
| 80–89 | B | Good | Meets most compliance requirements |
| 70–79 | C | Fair | Basic compliance achieved |
| 60–69 | D | Needs Improvement | Several areas need attention |
| Below 60 | F | Needs Attention | Action needed to improve compliance |
Improving Your Score
The dashboard provides actionable recommendations when your score is below 100:
- Configure SSO — Set up SAML 2.0 with your identity provider and optionally enforce it for all users.
- Set data residency — Choose a specific data region to satisfy regional compliance regulations.
- Add additional admins — Invite at least one more admin or owner for operational redundancy.
Cost Avoidance Calculator
Based on industry benchmarks:
| Vertical | Cost per Record | Your Savings |
|---|---|---|
| Healthcare | $150 | $XXX,XXX |
| Financial | $120 | $XXX,XXX |
| Legal | $130 | $XXX,XXX |
| Technology | $100 | $XXX,XXX |
Risk Radar Chart
Visual representation of risk exposure by category:
- Identity (SSN, licenses)
- Financial (cards, accounts)
- Contact (email, phone)
- Healthcare (PHI)
- Code & IP (secrets, code)
- Location (addresses, GPS)
Board-Ready PDF Export
Generate 4-page executive report:
- Executive Summary: Key metrics, compliance status
- Protection Details: Entity breakdown, trends
- Risk Assessment: Radar chart, top risks
- Recommendations: Action items, improvements
Business Metrics Dashboard
Revenue Metrics
| Metric | Description |
|---|---|
| MRR | Monthly Recurring Revenue |
| ARR | Annual Recurring Revenue |
| ARPU | Average Revenue Per User |
| LTV | Customer Lifetime Value |
Conversion Funnel
Visitors ████████████████████ 10,000
Signups ████████████ 2,400 (24%)
Trials ████████ 960 (40%)
Paid ██████ 384 (40%)
Enterprise ██ 48 (12.5%)Churn Analysis
- Monthly churn rate
- Churn by tier
- Churn reasons
- At-risk customers
Tier Distribution
┌──────────┬──────────┬──────────┬──────────┬──────────┐
│ Starter │ Personal │ Team │ Business │Enterprise│
│ 1,200 │ 450 │ 200 │ 180 │ 24 │
└──────────┴──────────┴──────────┴──────────┴──────────┘Usage Dashboard
Quota Tracking
| Resource | Used | Limit | Remaining |
|---|---|---|---|
| API Requests | 15,432 | 25,000 | 9,568 |
| Storage | 2.4 GB | 10 GB | 7.6 GB |
| Team Members | 8 | 10 | 2 |
| Sessions | 342 | ∞ | ∞ |
Usage Trends
API Requests (Last 7 Days)
Mon ████████████ 2,100
Tue ██████████████ 2,450
Wed ████████████████ 2,800
Thu ████████████████████ 3,200
Fri ██████████████ 2,400
Sat ████ 800
Sun ██ 420Rate Limiting Status
- Current rate: 120 req/min
- Limit: 500 req/min
- Burst capacity: 1000 req/5min
Detection Accuracy Dashboard
False Positive Rates
| Entity Type | FP Rate | Recommended Threshold |
|---|---|---|
| PERSON | 12% | Increase to 0.7 |
| DATE_TIME | 8% | Keep at 0.5 |
| US_SSN | 2% | Keep at 0.5 |
| 1% | Keep at 0.5 |
Threshold Tuning
Interactive slider for each entity type:
PERSON [====|======] 0.5 → Recommendation: 0.7
DATE_TIME [====|======] 0.5 → Recommendation: 0.5
US_SSN [==|========] 0.3 → Recommendation: 0.3Feedback Summary
- Total feedback: 1,234
- False positives reported: 156
- False negatives reported: 23
- Feedback applied: 89%
Observability Dashboards (Grafana)
GhostAI includes pre-built Grafana dashboards for infrastructure monitoring when the observability stack is enabled.
Setup
bash
# Start the observability stack
cd infrastructure/docker
docker-compose -f docker-compose.observability.yml up -d
# Enable telemetry in backend
OTEL_ENABLED=true
# Access Grafana
open http://localhost:3001 # admin/adminGhostAI Overview Dashboard
Real-time application performance metrics:
| Panel | Metrics |
|---|---|
| Request Rate | Requests per second by endpoint |
| Error Rate | 4xx and 5xx responses |
| API Latency | p50, p95, p99 response times |
| PII Detection | Detection latency by detector |
| LLM Performance | Time to first token, total latency |
| Active Sessions | Current session count |
Key Metrics
| Metric | Description | Alert Threshold |
|---|---|---|
ghostai_http_requests_total | Total HTTP requests | N/A |
ghostai_http_request_duration_seconds | Request latency | p95 > 5s |
ghostai_pii_detection_duration_seconds | PII detection time | p95 > 500ms |
ghostai_llm_time_to_first_token_seconds | Streaming TTFT | p95 > 1s |
ghostai_pii_entities_detected_total | PII found by type | N/A |
Alerts
Pre-configured alerts in Prometheus:
- HighErrorRate: 5xx errors exceed 5%
- SlowAPIResponses: p95 latency > 5 seconds
- SlowPIIDetection: p95 detection > 500ms
- LLMAPITimeouts: Timeout rate > 0.1/sec
- ServiceDown: Backend unreachable
Distributed Tracing (Jaeger)
Access Jaeger for request tracing:
http://localhost:16686Search traces by:
- Service name:
ghostai-backend,ghostai-frontend - Operation:
chat.stream,pii.detection,llm.request - Tags:
user.id,session.id,model
Accessing Dashboards
Via UI
- Click Analytics in sidebar → Analytics Dashboard
- Click Executive in sidebar → Executive Dashboard
- Click Metrics in sidebar (admin) → Business Metrics
- Click Usage in sidebar → Usage Dashboard
Via API
bash
# Get analytics data
curl http://localhost:8000/api/analytics \
-H "Authorization: Bearer YOUR_TOKEN"
# Get executive summary
curl http://localhost:8000/api/executive-summary?period=30d \
-H "Authorization: Bearer YOUR_TOKEN"
# Export board report
curl http://localhost:8000/api/reports/board?format=pdf \
-H "Authorization: Bearer YOUR_TOKEN" \
-o board-report.pdfConfiguration
Dashboard Refresh
json
{
"dashboards": {
"auto_refresh": true,
"refresh_interval_seconds": 300,
"cache_duration_seconds": 60
}
}Data Retention
Configure how long dashboard data is retained:
| Tier | Retention |
|---|---|
| Starter | 7 days |
| Personal | 30 days |
| Team | 60 days |
| Business | 90 days |
| Enterprise | Custom |
Exporting Data
Available Formats
- PDF: Formatted reports
- CSV: Raw data for analysis
- JSON: API-friendly format
- Excel: Spreadsheet format
Scheduled Reports
Scheduled report delivery is available from the admin UI and documented in Scheduled Reports. Set up automatic report delivery:
- Open Admin → Scheduled Reports (or use the Scheduled Reports admin feature from your deployment’s admin navigation)
- Select report type
- Choose schedule (weekly/monthly)
- Add recipients
Team Management Dashboard
The Admin Dashboard → Team provides a comprehensive suite of team management tools:
Pending Invites
View all pending invitations with status, expiry dates, and batch actions (resend all, cancel all).
Allowed Domains
Manage email domains for automatic membership. Add domains, toggle auto-join, and verify ownership via DNS TXT records.
Invite Links
Create shareable team join URLs with configurable role, expiry, maximum uses, and optional admin approval. Review and approve/deny pending join requests.
Welcome Message
Customize the welcome message that new team members see when they first join the organization. Live preview available.
Setup Checklist (Top-Level + Banner)
The setup checklist is now available in two complementary views:
Setup — A dedicated top-level section in the Admin Dashboard (next to Users, Team, SSO, etc.) with a detailed step-by-step checklist. Each step shows its label, description, and completion status alongside a progress summary card with percentage and completed/total count. Ideal for walking through initial organization configuration.
Dismissible Banner — A compact banner at the very top of the Admin Dashboard (above all sections) showing a progress bar with completion percentage and incomplete-step pills for at-a-glance visibility. The banner auto-hides when all steps are complete, or admins can dismiss it for the session.
SCIM Provisioning
Connect your Identity Provider (Okta, Azure AD, OneLogin) for automated user lifecycle management. Generate and manage SCIM bearer tokens.
Activity Feed
Real-time audit log of all team and administrative actions. Color-coded action types with human-readable labels and relative timestamps.
Team Activity Feed
The activity feed (Admin Dashboard → Team → Activity) shows real-time events including:
| Action | Description |
|---|---|
| user.invited | Team member invited |
| user.joined | User accepted invitation |
| user.offboarded | User offboarded (data transferred, keys revoked) |
| role.changed | User role updated |
| domain.added | Allowed domain added |
| link.created | Invite link generated |
| scim.provisioned | User provisioned via SCIM |
| policy.updated | Organization policy changed |
Platform Admin Console
The Platform Admin Console provides cross-tenant platform administration. Access it via the sidebar (Platform Admin icon). Requires Platform Admin or Cloud Admin role.
Organizations
| Column | Description |
|---|---|
| Organization | Name and slug |
| Parent | Parent org (for sub-organizations) |
| Owner | Owner email |
| License | Subscription tier dropdown (Starter, Personal, Team, Business, Enterprise) — editable |
| Usage | Requests used / limit with color-coded progress bar |
| Region | Data residency region |
| Seats | Members / seats limit |
| Sub-Orgs | Count of sub-organizations |
Click View to open the organization detail modal with:
- Slug, data region, owner, and creation date
- Usage & Limits section with plan tier dropdown, requests progress bar, and seats progress bar
- Parent organization (if applicable)
- Sub-organizations list
- Members list with roles
License changes are made at the organization level, not per-user. Changing an org's tier updates usage limits for all members.
Users
| Column | Description |
|---|---|
| User | Name and email |
| Orgs | Number of organizations |
| Sessions | Number of chat sessions |
| License | Read-only tier badge (inherited from organization) |
| Role | Platform role dropdown (None, Platform Admin, Cloud Admin, MSP Admin, Consumer Admin, Observer) |
Click View to open the user detail modal with email verification status, platform role dropdown, creation date, and organization memberships.
Admins
Displays all users with platform roles, grouped into sections:
- Admin Configuration — Shows which emails are configured for initial admin setup via
PLATFORM_ADMIN_EMAILandCLOUD_ADMIN_EMAILenvironment variables - Platform Admins — Users with full platform control (demote available)
- Cloud Admins — Users managing tenants and billing (promote to Platform Admin, demote)
- MSP Admins — Users managing sub-tenants (promote to Cloud Admin, demote)
- Admin Role Reference — Quick reference of what each role can do
See Roles & Permissions for detailed role documentation.
Chat Flow Debugger (Platform Admin Console)
The Chat Flow Debugger is a diagnostic tool accessible from Platform Admin Console → Chat Debug. It captures and visualizes the full lifecycle of every chat request — like "Chrome DevTools Network tab" but for chat flows.
What it Captures
Every chat request is traced through the full pipeline:
| Stage | Event Type | Details Captured |
|---|---|---|
| PII Detection | pii_detect | Entity count, detection time, code policy |
| Tokenization | pii_tokenize | Token count |
| Tool Resolution | tools_resolved | Available tools, user-enabled tools, final set |
| LLM Request | llm_request | Model, provider, tool count, message count |
| First Token | llm_first_token | Time to first token (TTFT), tool round |
| Tool Execution | tool_call / tool_result | Tool name, arguments, execution time, result preview |
| Provider Fallback | fallback_no_tools | Error message, tools stripped (when provider rejects tool use) |
| Detokenization | detokenize | Response length, token restoration |
| Completion | llm_done | Total time, response length, tool rounds |
| Error | error | Error message and type |
Using the Debugger
- Open Platform Admin Console (sidebar → Platform Admin)
- Click Chat Debug
- Recent traces appear on the left, color-coded:
- Green = Success
- Yellow = Tool fallback (tools stripped by provider)
- Red = Error
- Click a trace to see the timeline waterfall on the right
- Click any event row to expand the full JSON detail payload
Filters
- All / Errors / Tool Calls / Fallback — quick filter buttons
- Session ID — text filter for a specific session
- Auto-refresh — polls every 2 seconds when enabled
API Endpoints
bash
# List recent traces
curl http://localhost:8000/api/admin/chat-debug/traces?limit=50
# Get full trace detail
curl http://localhost:8000/api/admin/chat-debug/traces/{trace_id}
# Clear all traces
curl -X DELETE http://localhost:8000/api/admin/chat-debug/tracesTroubleshooting Common Issues
| Symptom | What to Look For |
|---|---|
| Chat stuck at "Thinking" | Check for error events, missing llm_first_token |
| Web search not working | Look for fallback_no_tools — provider may not support tool calling |
| Slow responses | Compare llm_request → llm_first_token timing (TTFT) |
| PII not detected | Check pii_detect entity count and detection time |
| Tool calls failing | Expand tool_result events for error details |
File Pipeline Debugger
The File Pipeline Debugger is an end-to-end diagnostic tool for platform admins that tests the complete file processing pipeline in a single run — from backend health through upload, RAG indexing, PII scan, chat stream, and memory impact.
Access
Platform Admin Console → Upload Test tab
7-Phase Diagnostic
| Phase | What It Tests | Key Output |
|---|---|---|
| 0. Health Pre-flight | /health, /health/ready, /health/pii-model | PII model status, DB connectivity, LLM availability |
| 1. Upload | Compress + upload flow | Upload duration, file ID, content type |
| 2. RAG Indexing Poll | Polls metadata for is_indexed and chunk_count | Indexing completion time, chunk count, RAG config (embedding model, chunk sizes, hybrid flag) |
| 3. PII Scan + Preview | PII scan + text extraction preview | Entity count, extracted text length, security findings |
| 4. Chat Stream Test | POST /api/chat/stream with attachment | SSE events, TTFT, RAG retrieval metrics (chunks retrieved, top score, search mode, fallback status) |
| 5. Chat Trace | Fetches diagnostic trace for the test session | PII/LLM/tool timing, attachment prep detail, RAG retrieval breakdown |
| 6. Memory Delta | /health/file-pipeline before vs. after | Worker RSS delta, OOM risk assessment |
Error Classification
The debugger automatically classifies failures with color-coded badges:
| Badge | Meaning |
|---|---|
| OOM (502) | Worker ran out of memory and was killed |
| Timeout (504) | Request exceeded ALB/CloudFront timeout |
| Unavailable (503) | Backend not ready or overloaded |
| Rate Limit (429) | LLM provider rate limit exceeded |
| Auth Error (401/403) | Authentication or authorization failure |
| Scan Timeout | PII scan exceeded 30 seconds |
| SSE Error | Backend sent an error event in the stream |
Additional Features
- Visual timing waterfall — horizontal bar chart showing each phase's duration proportionally
- Configurable chat prompt — default "Summarize this file", editable for testing specific RAG scenarios
- Test file cleanup — delete the test file after the run to avoid cluttering storage
- Export — "Copy as JSON" or "Copy as text" for support tickets
Troubleshooting Guide
For detailed diagnosis of file pipeline failures, see the File Pipeline Troubleshooting guide.
Observer / Growth Dashboard
The Observer Growth Dashboard provides a read-only, presentation-grade view of platform adoption and growth metrics. It is designed for sharing with VCs, board members, investors, and external stakeholders.
Access Methods
| Method | How |
|---|---|
| Sidebar button | Users with Observer role (or Platform Admin) see a "Growth Dashboard" button in the sidebar |
| Share link | Platform admins generate time-limited links from Analytics → Observer Dashboard Share Links |
| Direct URL | /observer (authenticated) or /observer?token=TOKEN (public) |
Metrics Displayed
Hero Metrics Row
| Metric | Description |
|---|---|
| Total Users | Total registered users with 30-day new signup count |
| Active Users (7d) | Users active in the last 7 days with % of total |
| MRR | Monthly Recurring Revenue with ARR below |
| K-Factor | Viral coefficient from referral program |
| Conversion Rate | Trial-to-paid conversion with churn rate below |
| Organizations | Total orgs with 30-day new org count |
Charts
- User Growth — 90-day bar chart of daily new user signups
- Organization Growth — 90-day bar chart of daily new organization creation
Tier Distribution
Horizontal bar breakdown showing user counts per subscription tier (Starter, Personal, Team, Business, Enterprise).
Referral Funnel
Visual funnel showing Signups → Activated → Converted with activation rate, conversion rate, and K-factor metrics.
Share Link Management
Platform admins manage share links from Platform Admin Console → Analytics:
- Enter a label (e.g., "Sequoia Q1 Review") and select expiry (7–365 days)
- Click Generate Link
- Copy the link to share
- View access counts and revoke links as needed
API Endpoints
bash
# Get dashboard data (authenticated or with token)
GET /api/observer/dashboard
GET /api/observer/dashboard?token=TOKEN
# Create share token (platform admin only)
POST /api/observer/share-tokens
# List share tokens
GET /api/observer/share-tokens
# Revoke share token
DELETE /api/observer/share-tokens/{token_id}Auto-Refresh
The dashboard auto-refreshes every 60 seconds to keep metrics current during live presentations.
Best Practices
- Review weekly: Check analytics for trends
- Export monthly: Generate compliance reports
- Act on recommendations: Apply threshold changes
- Share with stakeholders: Use executive dashboard or Observer Growth Dashboard share links
- Monitor usage: Stay within quotas
- Check team activity: Review the activity feed for unexpected changes
- Complete setup checklist: Use Setup for a detailed walkthrough, or glance at the banner at the top of the Admin Dashboard for quick progress
- Debug chat issues: Use the Chat Flow Debugger to diagnose streaming, tool execution, and provider fallback issues
- Performance visibility: Every assistant message includes an expandable Performance Waterfall (click "Thought for X seconds" → "Advanced details") showing a 9-phase latency breakdown with GhostAI stack vs External LLM percentages — no admin access required
Next Steps
- Compliance Reports - Detailed compliance
- Scheduled Reports — Automated delivery (admin)
- PII Detection - Detection tuning
Referral Dashboard
The Referral Dashboard is accessible from the sidebar (Refer & Earn) and provides users with:
- Referral Link — Unique shareable link with copy-to-clipboard and social share buttons
- Stats Grid — Signup, activation, conversion counts, and credits earned
- Milestone Progress — Visual progress bar toward next milestone (3, 10, 25, 50 referrals)
- Leaderboard — Top referrers ranked by activations
- Rewards Ledger — History of earned credits and account credits
- Recent Referrals — Table of referred users with status badges
API Endpoint
GET /api/referral/stats — Returns all dashboard data for the authenticated user.
Launch War Room
A standalone real-time dashboard for monitoring referral launches on a large screen or TV.
Running the Dashboard
bash
python infrastructure/scripts/launch-dashboard.py --api-url http://localhost:8000 --token JWT_TOKEN --port 9090Display Panels
- Hero Counters — Total signups, activations, conversions, credits granted, K-factor
- Signup Velocity — Bar chart of signups per hour (last 48 hours)
- Funnel — Visual funnel from signup → activation → conversion
- Leaderboard — Top 8 referrers with rank and count
- Live Event Feed — Real-time stream of signup/activation/conversion events
API Endpoint
GET /api/referral/war-room — Returns aggregated metrics for the dashboard poller.
Stress Test War Room
Standalone real-time dashboards for monitoring infrastructure during stress and load tests. Two variants exist: one for AWS deployments and one for local Docker Compose deployments. Both serve a dark-mode web UI with gauges, charts, and a k6 metrics receiver.
AWS Stress Test Dashboard
Monitors AWS infrastructure (ECS, RDS, ALB, WAF) via CloudWatch.
bash
source securechat/backend/.venv/bin/activate
python infrastructure/scripts/stress-dashboard.py [--port 9090] [--region us-west-2]| Panel | Metrics |
|---|---|
| Gauges | ECS CPU, ECS Memory, RDS Connections, WAF Blocked |
| Mini Stats | RDS CPU, Burst Balance, ALB Active Conns, WAF Allowed |
| Charts | ALB Request Count, Response Time, 5XX Errors, RDS Latency |
| k6 Section | Auto-appears when k6 pushes metrics to POST /api/k6 |
Requires: pip install boto3 and valid AWS credentials.
Local Stress Test Dashboard
Monitors Docker containers (ghostai-backend, ghostai-postgres, ghostai-redis) via the Docker SDK.
bash
source securechat/backend/.venv/bin/activate
python infrastructure/scripts/stress-dashboard-local.py [--port 9090] [--target http://localhost:8000]| Panel | Metrics |
|---|---|
| Gauges | Backend CPU, Backend Memory, Postgres Connections, Postgres CPU |
| Mini Stats | Postgres Memory, Redis Memory, Redis Clients, Health Latency |
| Charts | Backend Response Time, Backend CPU/Memory, Postgres CPU/Memory, Postgres Connections |
| Status Bar | Per-container status (backend, postgres, redis, frontend), Health check result |
| k6 Section | Auto-appears when k6 pushes metrics to POST /api/k6 (same as AWS variant) |
Requires: pip install docker and a running Docker daemon.
Gracefully degrades when containers are missing (e.g., no Redis when using the simpler securechat/docker-compose.yml).
Native Stress Test Dashboard
Monitors locally-running processes (uvicorn backend, Vite frontend) and SQLite via psutil. Designed for the native (no containers) deployment target.
bash
source securechat/backend/.venv/bin/activate
python infrastructure/scripts/stress-dashboard-native.py \
[--port 9093] \
[--target http://localhost:8000] \
[--db-path securechat/backend/data/ghostai.db] \
[--pid-dir ~/.config/ghostai/pids]| Panel | Metrics |
|---|---|
| Gauges | Backend CPU, Backend Memory (RSS MB), System CPU, System Memory |
| Mini Stats | SQLite DB Size, Backend Threads, Backend Open FDs, Health Latency |
| Charts | Backend Response Time, Backend CPU/Memory, System CPU/Memory, SQLite DB Size |
| Status Bar | Backend process (PID), Frontend process (PID), Health check result, DB path |
| k6 Section | Auto-appears when k6 pushes metrics to POST /api/k6 (same as other variants) |
Requires: pip install psutil.
Auto-discovers the backend process via PID files (~/.config/ghostai/pids/backend.pid) or by scanning for uvicorn app.main in running processes. Gracefully degrades when processes or the SQLite file are not found.
k6 Integration
All three dashboards expose POST /api/k6 to receive live metrics from the k6 test runner. When k6 begins pushing data, the dashboard automatically shows virtual user counts, HTTP failure rates, chat latency p95, and TTFB p95.
AI Protection Dashboard
The AI Protection tab is available to organization admins under Admin → Security → AI Protection. It provides visibility and control over AI-powered PII detection across your organization.
Protection Status
Shows the health and configuration of the private (in-environment) detection model. Displays model name, runtime (CPU/GPU), deploy mode, and whether the model is loaded. When a remote inference service is used, shows the active model, endpoint, and GPU details.
Detection Policy
Org-wide defaults for the detection model and verification mode. Admins can choose:
- Detection Model: Private Model (in-environment, data never leaves your network), Cloud API, or Custom Endpoint
- Verification Mode: Verify All, Suspicious Only, or Off
Each setting can be locked so users cannot override the org default. Locked settings display a notice to users explaining the policy.
Protection Metrics
Aggregated metrics over 7d, 30d, or 90d:
- Sessions protected, entities detected, active users
- Detection model usage split (private vs cloud vs custom)
- Entity breakdown by type (PII categories; only enabled entity types are shown)
User Detection Overview
Table of all users with detection activity, showing each user's active detection model, entities detected, and whether they match the org default (Compliant) or use an override.
Admin Dashboard: RAG / File Intelligence
The Admin Dashboard includes a dedicated RAG / File Intelligence section for platform administrators to configure retrieval settings organization-wide.
Available Controls
| Setting | Description |
|---|---|
| Hybrid Search | Toggle BM25 + semantic search with Reciprocal Rank Fusion |
| HNSW ANN | Enable HNSW approximate nearest neighbor for files with >100K chunks |
| Chunk-Level PII Cache | Cache PII detection results per chunk to avoid redundant scanning |
| Streaming Ingestion | Stream large text files (>50 MB) into the index without full memory load |
| Embedding Device | Select hardware for vector embeddings: Auto-detect, CPU, CUDA (NVIDIA), or MPS (Apple Silicon) |
| RAG Indexing Threshold | File size above which automatic chunking and indexing activates (default: 1 MB) |
| Streaming Threshold | File size above which streaming ingestion activates (default: 50 MB) |
Observability
RAG operations emit Prometheus metrics and OpenTelemetry spans:
ghostai_rag_retrieval_total— retrieval count by file type and search modeghostai_rag_retrieval_duration_seconds— end-to-end retrieval latencyghostai_rag_chunks_retrieved— chunks returned per queryghostai_rag_top_similarity_score— top match score per queryghostai_rag_budget_utilization— fraction of context budget consumedghostai_rag_indexing_duration_seconds— file indexing durationghostai_rag_pii_cache_hits_total/ghostai_rag_pii_cache_misses_total— PII cache effectiveness
These metrics are available on the /metrics endpoint and can be scraped by Prometheus or viewed in Grafana.