dbmonk
v0.1.5
Published
Ultra-Advanced Database Monitoring CLI for PostgreSQL and MySQL
Maintainers
Readme
dbmonk
Ultra-Advanced Database Monitoring CLI for PostgreSQL and MySQL.
dbmonk is a high-performance, intelligent database health analyst built for modern engineering teams. It provides deep visibility into your database systems with zero-overhead, real-time monitoring, and automated root-cause analysis.
🚀 Quick Start
Installation
Install globally via npm:
npm install -g dbmonkRun a Health Check (Doctor)
Get an instant assessment of your database's current state:
dbmonk doctorLaunch the Live Dashboard
Monitor your database in real-time with an interactive TUI:
dbmonk live🧪 Try it Now (No DB Required)
See dbmonk in action immediately using the built-in demonstration mode:
# Full health report demo
dbmonk doctor --mock
# Interactive dashboard demo
dbmonk live --mock
# Lock tree visualization demo
dbmonk locks --mock✨ Key Features
- Intelligent Health Scoring: A multi-dimensional model evaluating Availability, Performance, Concurrency, and Resource Pressure.
- Real-time TUI Dashboard: A premium, interactive terminal experience for live observability.
- Anomaly Correlation: Detects complex issues by correlating multiple signals (latency + locks + saturation).
- Root Cause Diagnostics: Explains why performance is degrading and provides actionable recommendations.
- Predictive Forecasting: Estimates when you'll hit critical thresholds like disk exhaustion or connection limits.
- Production Safe: Read-only by default with minimal overhead queries.
📖 Configuration
dbmonk can be configured via environment variables or a .env file in your current directory.
Environment Variables
DB_ENGINE=postgres # or mysql
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_password
DB_DATABASE=my_app_db📋 Commands Reference
| Command | Description | Example |
| :--- | :--- | :--- |
| doctor | Full health assessment and recommendations | dbmonk doctor |
| live | Interactive real-time dashboard | dbmonk live |
| locks | Visualize active locking trees and root blockers | dbmonk locks |
| top | Show high-impact database activity | dbmonk top |
| diagnose | Perform symptom-based root cause analysis | dbmonk diagnose |
| storage | Analyze space usage and growth trends | dbmonk storage |
🏗 Architecture
dbmonk uses a modular adapter-based architecture to ensure extensibility and high performance.
- Adapters: Normalize metrics from different engines (PG, MySQL) into a unified internal model.
- Engines: Specialized logic for scoring, anomalies, and diagnostics.
- Storage: A lightweight SQLite-based history store for trend analysis and forecasting.
- TUI: Built with
blessedandblessed-contribfor a fast, resource-efficient dashboard.
🛡 Security & Safety
- Read-Only:
dbmonkonly executesSELECTandSHOWcommands on system views. It will never modify your data or configuration. - Zero Impact: Collectors use batched execution and adaptive sampling to ensure they never become the bottleneck.
📄 License
MIT License.
