This project provides a complete, production-grade monitoring stack for DevOps engineers, SREs, and beginners. With just one command, you get:
๐ฏ Demo Preview Available: Check out the live demo at devops-monitoring-in-a-box.vercel.app
Login: demo@example.com / demo123 (Demo credentials only - configure your own for production)
- ๐ Prometheus โ High-performance metrics collection and alerting engine
- ๐ Grafana โ Beautiful dashboards with pre-provisioned datasources and views
- ๐ Loki โ Centralized log aggregation and stream querying
- ๐จ Alertmanager โ Multi-channel notification router (Slack, Teams, Discord, Email, Webhooks)
- ๐ฅ๏ธ Node Exporter โ Real-time host and system metrics (CPU, RAM, Disk, Load, Network)
- ๐ณ cAdvisor โ Container CPU, memory, and lifecycle resource monitoring
- ๐ฐ๏ธ Blackbox Exporter โ Synthetic HTTP/HTTPS, TCP, DNS, and ICMP uptime probing
- ๐ SSL/TLS Certificate Tracker โ Domain certificate expiration, validity days, and SAN inspector
- โฑ๏ธ SLI/SLA Availability Engine โ 99.9% / 99.99% uptime heatmaps and MTTR tracking
- ๐ Multi-Channel Notification Service โ Automated webhook dispatching and masking
- ๐จ Radix-Sera Unified UI โ Modern Next.js 16 web interface styled with shadcn UI and Hugeicons
๐ Perfect for learning, testing, local homelabs, or full production deployments.
๐ What Sets Us Apart: While most monitoring projects stop at Prometheus + Grafana, we provide a modern, responsive web interface that unifies all your monitoring tools into one seamless dashboard experience!
- shadcn UI with Sera Preset: Clean, high-contrast aesthetics with seamless Dark/Light mode switching.
- Hugeicons Integration: Crisp, accessible stroke icons replacing bulky legacy icon sets.
- Micro-animations: Smooth Framer Motion transitions across dashboard widgets, metrics cards, and log inspectors.
- Real-time Probing: Live SSL/TLS inspection via
/api/sslfor any public or internal domain. - Early Expiry Warnings: Color-coded badges for Valid (>30d), Warning (14-30d), and Critical/Expired (<14d).
- Certificate Metadata: Displays Certificate Authority (Issuer CA), Subject, Validity ranges, Serial Numbers, and Subject Alternative Names (SANs).
- Uptime Heatmaps: Interactive 30-day timeline bars showing daily uptime percentages.
- Key Reliability Metrics: Mean Time to Recovery (MTTR), 24h/7d/30d availability SLAs, and active outage counters.
- Synthetics Integration: Automatically correlates with Prometheus Blackbox Exporter probe results.
- One-Click Silences: Create 1h, 2h, 4h, or 24h silences directly from the alert cards.
- Inhibitor Rules: Pre-configured alert inhibition prevents alert fatigue when root hosts go down.
- Docker Scout Verified: Clean scan with 0 Critical CVEs.
- Process Supervision (
tini): Proper PID 1 signal forwarding (SIGTERM/SIGINT) and zombie reaping. - Least-Privilege Execution: Runs under a dedicated non-root
nextjsuser with secured.next/cachepermissions.
Choose your preferred deployment method based on your needs:
# Clone the repository
git clone https://github.com/NotHarshhaa/devops-monitoring-in-a-box.git
cd devops-monitoring-in-a-box
# Generate secure secrets (.env and Alertmanager token)
./scripts/setup-env.sh
# Start the complete monitoring stack
docker compose up -d.\scripts\devops-monitor.ps1 init-env # generate .env with strong secrets
.\scripts\devops-monitor.ps1 start # start the stack
.\scripts\devops-monitor.ps1 status # containers + dashboard health
.\scripts\devops-monitor.ps1 health # probe every published endpoint
.\scripts\devops-monitor.ps1 logs -Service prometheus
.\scripts\devops-monitor.ps1 validate # promtool + amtool + compose config
.\scripts\devops-monitor.ps1 verify # lint, type-check, tests, build
.\scripts\devops-monitor.ps1 clean # remove containers and volumesdocker pull harshhaareddy/devops-monitoring-box:latest
docker run -d -p 4000:3000 --name devops-monitor harshhaareddy/devops-monitoring-box:latest# Deploy the UI to Vercel
cd ui-next
npm install
vercel --prod# Build and deploy to Netlify
cd ui-next
npm install
npm run build# Deploy full stack to Railway
railway login
railway init
railway upOnce deployed, access your monitoring tools:
| Service | Port / URL | Credentials | Description |
|---|---|---|---|
| ๐จ DevOps Monitor UI | http://localhost:4000 | demo@example.com / demo123 | Unified observability web application |
| โค๏ธ Health API | http://localhost:4000/api/health | - | Stack health, used by the container healthcheck |
| ๐ Grafana | http://localhost:3000 | admin / admin |
Visualization dashboards with pre-provisioned datasources |
| ๐ Prometheus | http://localhost:9090 | - | Metrics collection & PromQL engine |
| ๐ Loki | http://localhost:3100 | - | Log aggregation and query service |
| ๐จ Alertmanager | http://localhost:9093 | - | Alert routing & silencing |
| ๐ฐ๏ธ Blackbox Exporter | http://localhost:9115 | - | HTTP/TCP uptime probing |
| ๐ฅ๏ธ Node Exporter | http://localhost:9100/metrics |
- | Host kernel & hardware metrics |
| ๐ณ cAdvisor | http://localhost:8080/metrics |
- | Container performance metrics |
Bash Command (./devops-monitor.sh) |
PowerShell (.\scripts\devops-monitor.ps1) |
Purpose |
|---|---|---|
./devops-monitor.sh start |
.\scripts\devops-monitor.ps1 start |
Start all stack containers |
./devops-monitor.sh status |
.\scripts\devops-monitor.ps1 status |
Check service health & running state |
./devops-monitor.sh health |
.\scripts\devops-monitor.ps1 health |
Probe all endpoints for 200 OK |
./devops-monitor.sh logs |
.\scripts\devops-monitor.ps1 logs |
View unified logs across services |
./devops-monitor.sh stop |
.\scripts\devops-monitor.ps1 stop |
Gracefully shut down all containers |
./devops-monitor.sh clean |
.\scripts\devops-monitor.ps1 clean |
Remove containers and data volumes |
prometheus/- Metrics collection, alert rules, andtargets/probe listsgrafana/- Dashboard and visualization provisioningloki/- Log aggregation and collection configsalertmanager/- Alert routing, notification channels, and silencingui-next/- Modern Next.js web applicationdocs/- Comprehensive documentationexporters/- Exporter configuration (Blackbox uptime probing)
devops-monitor.sh- Main management script (Linux/macOS wrapper)scripts/devops-monitor.ps1- Native Windows PowerShell management scriptenv.example- Environment variables templatesite-config.json- Site configuration (SEO, branding)config.json- Monitoring configurationdocker-compose.yml- Production stack configurationprometheus/targets/*.yml- Uptime probe targets, hot-reloaded without restart
For a complete breakdown of all directories and files, see Project Structure Guide.
- ๐ Metrics Collection: Prometheus with Node Exporter for system metrics
- ๐ผ๏ธ Dashboards: Pre-configured Grafana dashboards with beautiful visualizations
- ๐ Log Aggregation: Loki + Promtail for centralized log management
- ๐จ Alert Management: Alertmanager with multi-channel notifications
- ๐ Service Health: Real-time service status monitoring
- ๐ฅ๏ธ Unified Dashboard: Single-page application for all monitoring needs
- ๐ฑ Responsive Design: Works perfectly on desktop, tablet, and mobile
- ๐ Dark/Light Theme: Automatic theme switching with user preference
- โก Real-time Updates: Live data refresh without page reloads
- ๐ฏ Intuitive Navigation: Easy-to-use sidebar navigation
- ๐ค User Authentication: Secure login system with session management
- ๐ข Multi-tenant Support: Role-based access control (Admin, Editor, Viewer)
- ๐ Secure API: Protected endpoints with authentication middleware
- ๐ก๏ธ Input Validation: Comprehensive data validation and sanitization
- ๐ง Email Alerts: SMTP-based email notifications
- ๐ฌ Slack Integration: Direct Slack channel notifications
- ๐ฏ Microsoft Teams: Teams webhook integration
- ๐ฎ Discord Support: Discord webhook notifications
- ๐ Custom Webhooks: Generic webhook support for any service
The stack ships a Blackbox Exporter so you can watch any HTTP, HTTPS or TCP endpoint:
Add targets to prometheus/targets/http-probes.yml without restarting the stack:
# prometheus/targets/http-probes.yml
- targets:
- https://api.yourcompany.com/health
- https://yourcompany.com
labels:
module: https_2xx # probe module from exporters/blackbox/config.yml
env: production # any labels you add appear on the probe_* series
team: platformOn Windows, the management script can add probes for you:
.\scripts\devops-monitor.ps1 probe -Url https://my-app.example.com/healthPrometheus automatically hot-reloads probe target files every 30 seconds.
The browser never calls Prometheus, Loki or Alertmanager directly. It calls the dashboard, which forwards the request server-side:
browser โโโถ /api/proxy/prometheus/api/v1/query โโโถ http://prometheus:9090/api/v1/query
This matters for three reasons:
- It works in Docker. Container hostnames such as
prometheus:9090cannot be resolved by a browser, so direct calls fail in any containerised deployment. - No CORS setup. Requests are same-origin.
- The backends can stay private. You can remove the published
9090,3100and9093ports entirely and the dashboard keeps working.
Every proxied request requires a signed-in user, and each upstream path is matched against an explicit allowlist (ui-next/lib/server/upstream.ts). Administrative endpoints โ Prometheus' admin/tsdb/delete_series, Loki's push โ are not reachable through the proxy.
- Scrapes metrics from Node Exporter and cAdvisor every 15 seconds
- Stores time-series data for historical analysis
- Built-in query language (PromQL) for data exploration
- Pre-configured Prometheus and Loki data sources
- Node Exporter and container dashboards showing real-time metrics
- Custom alerts and dashboard templating
- Collects logs from containers and system services
- Efficient log storage and querying
- Log-to-metric correlations in Grafana
- Production-ready alert rules for system, disk, and container alerts
- Slack/Email/Discord/Teams webhook routing
- Integrated silence management
- Host CPU, memory, disk, network metrics
- Container memory working sets, CPU throttling, and OOM event tracking
๐ Complete Documentation Hub - Comprehensive guides and setup instructions
- Setup Guide - Detailed setup instructions
- Configuration Guide - Complete configuration reference
- Project Structure - Complete project structure overview
- Prometheus Integration - Metrics collection and configuration
- Grafana Dashboards - Dashboard setup and customization
- Loki Logs - Log aggregation and search
- AlertManager - Alert management and notifications
- Authentication & Multi-Tenancy - User management and role-based access
- UI Application - Next.js web interface documentation
- Configuration System - Dynamic configuration management
- Service Health - Health monitoring and status checks
- UX Improvements - User interface enhancements
- Plugin System - Plugin development and management
- Dashboard Templates - Template creation and marketplace
- Notifications Integration - Multi-channel notification setup
- Production Setup - Production deployment guide
NEXTAUTH_SECRETandALERT_WEBHOOK_TOKENare required โ Compose fails rather than accepting a shared/default signing key or an unauthenticated Alertmanager webhook. Generate both and the matchingalertmanager/webhook_tokenfile with./scripts/setup-env.shor.\scripts\devops-monitor.ps1 init-env.- Change default Grafana credentials before exposing the stack in production.
- Prometheus admin API (
--web.enable-admin-api) is disabled by default. /api/notificationsnever returns plain SMTP passwords or channel webhook URLs in client payloads; they are masked, and saving preserves stored secrets.- Published ports
9090,3100,9093, and9115are optional for convenience. The dashboard proxies internal traffic via Docker networks, so external ports can be removed in hardened environments.
- Fork the repository (
git clone https://github.com/NotHarshhaa/devops-monitoring-in-a-box.git) - Create a feature branch (
git checkout -b feature/awesome-feature) - Commit your changes (
git commit -m 'Add awesome feature') - Push to the branch (
git push origin feature/awesome-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Prometheus - Metrics collection
- Grafana - Visualization platform
- Loki - Log aggregation
- Node Exporter - System metrics
Built with passion and purpose by Harshhaa.
Your ideas, feedback, and contributions are what make this project better.
Letโs shape the future of DevOps monitoring together! ๐
Connect & Collaborate:
- GitHub: @NotHarshhaa
- Blog: ProDevOpsGuy
- Telegram Community: Join Here
- LinkedIn: Harshhaa Vardhan Reddy
If you found this project useful:
- โญ Star the repository to show your support
- ๐ข Share it with your friends and colleagues
- ๐ Open issues or submit pull requests to help improve it
Join the community, share your experience, and help us grow!











