Skip to content

Repository files navigation

BetterUptime

BetterUptime is a high-throughput, bare-metal native observability and uptime monitoring platform built on Rails 8. Engineered for reliability and sub-millisecond responsiveness with a zero-Docker footprint, it delivers an all-in-one suite unifying synthetic probing, OpenTelemetry distributed tracing, war room incident response, and status communication.

  • πŸ“‘ Native OpenTelemetry (OTel) Engine: Ingest standard OTLP logs, distributed traces, and metrics with automated incident-to-trace root-cause correlation.
  • ⚑ Multi-Vector Synthetic Probing: High-concurrency HTTP/S, SSL, ICMP Ping, TCP Port, and DNS checks with 90-day SLA availability strips.
  • 🚨 Real-Time Incident War Rooms: 4-stage automated incident lifecycle, timeline tracking, and auto-recovery triggers.
  • πŸ’Ύ Swappable Storage Architecture: Pluggable time-series storage backend supporting SQLite (WAL mode), Redis, and ClickHouse.
  • 🎨 Two-Tier Obsidian Interface: High-contrast Dark/Light theme engine, 56px collapsible icon sidebar, and sub-10ms global command palette (⌘K).

Demo

BetterUptime Product Demo


πŸ› οΈ Tech Stack

Layer Technologies & Tools
Backend Framework Ruby 3.3+, Ruby on Rails 8.0 (Bare-metal native, Zero Docker)
Frontend & UI Tailwind CSS, Hotwire (Turbo Drive), Vanilla ES6+ JavaScript, Vanilla CSS
Database & ORM SQLite3 (Primary transactional store with WAL mode & ACID compliance), ActiveRecord
Caching & Time-Series Swappable SQLite / Redis / ClickHouse storage adapter architecture (Storage::TimeSeriesStore)
Concurrency & Background Jobs Concurrent Ruby (Concurrent::Promises), ActiveJob, ProbeRunnerJob
Security & Hardening OWASP Top 10 centralized defenses, Rack::Attack rate limiting, BCrypt password hashing, TOTP 2FA, SAML 2.0 / OIDC SSO
API & Documentation RESTful JSON:API v1.1, OpenAPI / Swagger UI 3.0 (Live at /api/docs), Bearer Token Authentication
Testing & Quality Assurance RSpec 3.13, Capybara, WebMock, Custom OWASP Top 10 automated regression suites

⚑ First-Time Installation & Setup

For a new installation on a fresh machine or clone:

# 1. Automated one-click setup (dependencies, database creation, migrations, and seed data)
./bin/setup_project.sh

Alternatively, to seed existing database models manually:

./bin/seed_database.sh

πŸš€ Quick Reference Commands

  • Start Web Application: bin/dev (or bundle exec rails server)
  • Run Background Probes: bundle exec rails runner "ProbeRunnerJob.perform_now"
  • Run Complete Test Suite: bundle exec rspec --format documentation
  • Run OWASP Security Verification: bundle exec rspec spec/requests/owasp_top_10_spec.rb
  • Interactive Swagger Docs: http://localhost:3000/api/docs
  • Dashboard: http://localhost:3000

πŸ—οΈ Core Subsystems & Architecture

1. Two-Tier Navigation & Theme Engine

  • Primary Icon Bar (52px / #06090E): Fast app switcher (Monitors, Reporting, Logs & Traces, Settings), Swagger API docs, and user profile.
  • Secondary Sidebar (220px $\rightarrow$ 56px Collapsible): Smooth contextual navigation with icon-only mode and persistent state (localStorage).
  • High-Contrast Light / Dark Mode: Instant theme switcher with moon/sun icons, zero black-highlight artifacts, and tailored contrast ratios.

2. OpenTelemetry (OTel) Distributed Tracing & Structured Log Ingestion (/logs)

  • Native OTel Protocol Support: Ingests distributed traces, span metadata, and structured logs via standard OpenTelemetry exporters (OTLP/HTTP & OTLP/gRPC).
  • Incident-to-Trace Correlation (IncidentOtelCorrelation): Directly links production outages and probe degradation to root-cause distributed trace IDs and span trees.
  • Live Search & Filter: Instant live filtering by service name, trace ID, HTTP status, and log severity levels (DEBUG, INFO, WARN, ERROR, FATAL).
  • Span Waterfall Visualizer: Millisecond-level distributed span breakdown showing database query latency, downstream HTTP calls, and asynchronous worker execution.

3. Multi-Vector Synthetic Uptime Probing

  • Multi-Protocol Monitoring: HTTP/HTTPS, SSL certificate validation (expiry tracking and cipher verification), ICMP Ping, TCP Port, and DNS resolution.
  • Probe Executor (Monitors::ExecuteProbeActor): Microsecond latency benchmarking and automatic state evaluation.
  • Concurrent High-Throughput Batch Runner (ProbeRunnerJob): Asynchronous parallel probe dispatching powered by Concurrent::Promises without thread contention.
  • Visual SLA Strips: Fixed-width 30-day and 90-day SLA availability strips with per-day uptime calculation and category filter tabs (All, HTTP, Ping, SSL, Port).

4. Incident Management & Real-Time "War Room" (/incidents)

  • Automatic Incident Generation & Auto-Recovery: Instantly opens an incident with root-cause diagnostics upon probe degradation, and automatically marks it Resolved once the target endpoint recovers.
  • War Room State Machine: 4-Stage lifecycle: Investigating $\rightarrow$ Identified $\rightarrow$ Monitoring $\rightarrow$ Resolved.
  • Timestamped Activity Timelines: Complete audit trail of status notes, severity changes, and engineer assignments.

5. Global Command Palette (⌘K / Ctrl+K)

  • Real-Time Sub-10ms Fuzzy Search: Debounced lookup across monitors, incidents, on-call rotations, and status pages from anywhere in the application.
  • Keyboard-First Navigation: Fully controllable via arrow keys (↑, ↓), enter (↡), and ESC.

6. On-Call Rotations & Automated Escalations (/on-call)

  • Flexible Rotations: Daily, weekly, and custom on-call rotation schedules with automatic shift handovers and timezone support.
  • Multi-Level Escalation Policies: Automated threshold escalation (e.g., Primary Engineer $\rightarrow$ Secondary on-call after 5m $\rightarrow$ Engineering Lead after 15m).

7. Heartbeats & Cron Job Monitoring (/heartbeats)

  • Dead Man's Switch: Backup worker, cron job, and data pipeline health monitoring with copyable webhook tokens and configurable grace-period alerts.

8. Public Status Pages (/status-pages)

  • Customer-Facing Branded Pages: Custom subdomains, service component groups, real-time status pills, and incident history broadcasts.

9. Reporting, SLA & MTTR/MTTA Analytics (/reporting)

  • Dynamic Time Horizons: 24h, 7d, 30d, and 90d filters recalculating Mean Time to Acknowledge (MTTA), Mean Time to Resolve (MTTR), and availability percentages.
  • Interactive Histogram: Hourly, daily, weekly, and monthly bucket breakdown with hover inspection and click-to-select comparisons.

10. Comprehensive Enterprise Settings Subsystem (10 Submenus)

  • Account: Personal profile settings with IANA timezone database and phone validation (/settings/account).
  • Security: Password rotation, live password criteria checklist, and TOTP Multi-Factor Authentication (/settings/security).
  • Look & Feel: Brand accent colors and default theme options (/settings/look-n-feel).
  • Alerts: Multi-channel alerting via Email, SMS, and Slack webhooks (/settings/push-notifications).
  • Organization: Company profile and billing contact (/settings/organization/edit).
  • Teams: Member invitations and role-based access control (Owner, Admin, Member, Viewer) (/settings/teams).
  • Usage: Resource utilization meters and quota tracking (/settings/usage).
  • Billing: Active subscription tiers and Stripe invoice management (/settings/billing).
  • Single Sign-On (SSO): SAML 2.0 / OIDC enterprise identity integration (/settings/sso).
  • API Tokens: Bearer token generation, prefix hashing, and revocation (/settings/global-api-tokens).

11. Multi-Tenant REST API v1.1 & Interactive Docs

  • JSON:API Standard: Strict JSON:API compliance with Bearer token authentication.
  • Interactive Swagger UI: Live documentation and sandbox testing at /api/docs.

12. Security & OWASP Top 10 Compliance

  • Centralized Security::InputSanitizer: Multi-vector stored/reflected XSS neutralization, SSRF protection (blocking AWS metadata 169.254.169.254, localhost, and RFC 1918 private subnets), SQL injection and CSV formula injection escaping, and path traversal protection.
  • Rate Limiting & Abuse Defense: Rack::Attack brute-force protection and malicious scanner blocking.
  • Verified Regression Suite: Automated tests covering all OWASP Top 10 vulnerabilities (spec/requests/owasp_top_10_spec.rb).

About

Self-hosted observability & uptime monitoring platform with native OpenTelemetry (OTel) distributed tracing, synthetic multi-protocol probing, real-time war room incident response, and zero-Docker footprint.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages