Skip to content

amyanger/livepulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

livepulse

Real-time infrastructure monitor with a full interactive TUI dashboard. Single Go binary, no config files needed.

Go License

Features

  • 4 check types — HTTP endpoints, TCP ports, system metrics (CPU/mem/disk), custom shell commands
  • Live TUI dashboard — status overview, latency sparkline graphs, event log, keyboard navigation
  • Interactive setup — add/remove/edit monitors directly from the TUI, no config files to manage
  • Alert system — visual indicators + terminal bell, native desktop notifications, webhook POSTs (Slack, Discord, etc.)
  • Alert state machine — configurable thresholds for down detection (3 consecutive failures) and recovery (2 consecutive successes)
  • Concurrent monitoring — one goroutine per monitor, non-blocking checks
  • Persistent config — monitors survive restarts via ~/.livepulse/monitors.json

Install

go install github.com/arjunmyanger/livepulse/cmd/livepulse@latest

Or build from source:

git clone https://github.com/amyanger/livepulse.git
cd livepulse
go build -o livepulse ./cmd/livepulse

Usage

./livepulse

Launches the TUI dashboard. Press a to add your first monitor.

Keybindings

Dashboard

Key Action
a Add new monitor
e Edit selected monitor
d Delete selected monitor
Enter View monitor details
j / k Navigate up/down
? Help
q Quit

Detail View

Key Action
Esc Back to dashboard
e Edit monitor
d Delete monitor

Setup Wizard

Key Action
j / k Navigate options
Enter Confirm / next step
y / n Toggle yes/no options
Esc Cancel

Check Types

Type What it does Status logic
HTTP GET request, validate status code + measure latency Healthy if expected status, Down otherwise
TCP Connect to host:port Healthy if connection succeeds
System CPU%, memory%, disk% via gopsutil Degraded if any metric >90%
Custom Run a shell command (sh -c) Healthy if exit code 0

Alerts

Each monitor can independently enable:

  • Visual — terminal bell + color-coded status indicators
  • Desktop notifications — native OS notifications on state changes
  • Webhooks — POST JSON to a URL when a monitor goes down or recovers

Webhook payload:

{
  "monitor": "Production API",
  "status": "down",
  "previous_status": "healthy",
  "timestamp": "2026-03-28T14:30:00Z"
}

Architecture

cmd/livepulse/        Entry point
internal/
  monitor/            Checker interface, HTTP/TCP/system/custom checks, engine
  alert/              State machine, visual/desktop/webhook dispatchers
  store/              JSON persistence (~/.livepulse/monitors.json)
  tui/                Bubbletea app model, dashboard, detail, setup views
  tui/components/     Sparkline, status bar, event log

The monitor engine runs one goroutine per check on a configurable interval. Results flow through a buffered channel to the TUI, which updates the display and evaluates alert transitions.

Development

# Run
go run ./cmd/livepulse

# Test
go test ./...

# Test with race detection
go test -race ./...

# Build
go build -o livepulse ./cmd/livepulse

Built With

License

MIT

About

Real-time infrastructure monitor with a full interactive TUI dashboard. Single Go binary.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages