Why pgSentinel
Real-Time Web Dashboard
Interactive Next.js 14 dashboard with React 18, TypeScript, Tailwind CSS, and Recharts. Live WebSocket updates every 5 seconds for instant visibility.
Prometheus Integration
30+ custom metrics including active connections, CPU/memory usage, pool utilization, query throughput, and backend health with full PromQL support.
Grafana Visualization
2 professional dashboards with 22 panels covering system metrics, pg_stat_insights data, and custom analytics with configurable time ranges.
pg_stat_insights Analytics
Deep PostgreSQL performance analysis including slow queries, cache hit ratios, table bloat, index usage, replication lag, and optimization recommendations.
FastAPI Backend
High-performance Python 3.12 backend with 25+ RESTful endpoints, WebSocket support, Pydantic validation, and asyncpg for PostgreSQL connectivity.
Alert Management
Integrated Alertmanager with configurable routing, grouping, silencing, and notification channels for proactive incident response.
Docker Orchestration
8-service architecture with backend, frontend, website, PostgreSQL, Redis, Prometheus, Grafana, and Alertmanager all orchestrated via Docker Compose.
Production Ready
Complete with health checks, automatic restarts, volume persistence, network isolation, and comprehensive logging across all services.
pgSentinel Platform Architecture
Frontend Dashboard (Port 3000)
Next.js 14 + React 18 + TypeScript + Tailwind CSS
• WebSocket
• Recharts
• Interactive UI
• Pool Stats
• Node Status
• Custom Charts
• Health Check
• Config Editor
• One-Click Ops
Backend API (Port 8000)
FastAPI + Python 3.12 + Uvicorn + WebSocket
Prometheus
Grafana
Alertmanager
PostgreSQL 17
Redis 7
Node Exporter
pgbalancer Cluster
8-Service Docker Architecture
| Component | Technology | Purpose | Key Features |
|---|---|---|---|
| Frontend Dashboard | Next.js 14, React 18, TypeScript | Real-time monitoring interface | Live metrics, WebSocket updates, beautiful UI |
| Backend API | FastAPI, Python 3.12, asyncpg | API server & data aggregation | 25+ endpoints, WebSocket, Pydantic validation |
| Prometheus | Prometheus 2.x | Metrics collection & storage | 30+ custom metrics, PromQL, alerting |
| Grafana | Grafana 10.x | Professional visualization | 2 dashboards, 22 panels, custom queries |
| pg_stat_insights | PostgreSQL extensions | Deep performance analytics | Query stats, table/index analysis, recommendations |
| Redis Cache | Redis 7 | Session & data caching | Fast retrieval, session management |
| Alertmanager | Prometheus Alertmanager | Alert routing & notification | Routing, grouping, silencing |
| Node Exporter | Prometheus Node Exporter | System metrics collection | CPU, memory, disk, network stats |
Key Features
Real-Time Dashboard
Beautiful web-based interface with live metrics, connection pool visualization, and backend node management.
Prometheus Metrics
30+ custom metrics exported for comprehensive monitoring with PromQL query support and time-series analysis.
Grafana Dashboards
22 pre-built visualization panels covering all aspects of pgbalancer performance and health.
pg_stat_insights
Deep PostgreSQL performance insights with query analysis, table stats, index usage, and recommendations.
Alert Management
Integrated Alertmanager for configurable alerts, notifications, and incident response workflows.
REST API
Comprehensive FastAPI backend with 25+ endpoints for programmatic control and data access.
WebSocket Live
Real-time updates via WebSocket for instant metric refresh and live event streaming.
Docker Ready
Production-ready Docker Compose deployment with 8 integrated services and health checks.
Secure & Scalable
Enterprise-grade security with role-based access, Redis caching, and horizontal scalability.
Monitor Your pgbalancer Clusters
Deploy pgSentinel and gain real-time visibility into your PostgreSQL connection pooling infrastructure with professional dashboards and comprehensive analytics.