Skip to content

crabby-utils/perc-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

perc-stats

A lightweight monitoring dashboard for VPS servers running containerised apps with Podman. Designed for servers managed by the perc CLI.

perc-stats dashboard

Features

  • Real-time system metrics (CPU, memory, disk, network)
  • Per-container resource usage for Podman workloads
  • Historical data stored locally with redb
  • Single binary, no external dependencies
  • Live-updating dashboard via SSE

Installation

Download the latest binary from Releases:

curl -L https://github.com/crabby-utils/perc-stats/releases/download/v0.1.0/perc-stats -o /usr/local/bin/perc-stats
chmod +x /usr/local/bin/perc-stats

Or build from source:

cargo install --path .

Usage

perc-stats [OPTIONS]

Options

Flag Default Description
--port 9880 (or PORT env) HTTP listen port
--bind 0.0.0.0 Bind address
--data-dir /var/lib/perc-stats Directory for metrics database

Authentication

By default no authentication is required, which is fine if you restrict access at the network level (e.g. Tailscale).

To enable HTTP Basic Auth, set one of the following environment variables:

# Plaintext password (hashed with bcrypt at startup)
PERC_STATS_PASSWORD=mysecret

# Or provide a pre-hashed bcrypt password
PERC_STATS_PASSWORD_HASH='$2b$12$...'

Optionally set a custom username (defaults to admin):

PERC_STATS_USERNAME=darren

Generate a bcrypt hash with:

htpasswd -nbBC 12 "" 'yourpassword' | cut -d: -f2

The /healthz endpoint is always unauthenticated.

Endpoints

Path Description
/ Dashboard UI
/api/system?range=1h System metrics JSON
/api/containers?range=1h Container metrics JSON
/api/live SSE stream of live snapshots
/healthz Health check

License

MIT

About

A lightweight monitoring dashboard for VPS servers running containerised apps with Podman. Designed for servers managed by the perc CLI.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors