Commit Graph
10 Commits
Author SHA1 Message Date
Joel Male f4e5bafa73 fix: update re-execs with sudo; version output with color and formatting
- 'update' now re-execs with sudo when not root (same pattern as status)
- 'version' output: name and version on separate lines, cyan version number,
  green for up-to-date, yellow for available update
- 'update' output: matching color treatment, red on failure
- Deduplicate color constants — single package-level set used everywhere
2026-02-25 15:02:32 +10:00
Joel Male c0541f7bc9 fix: exclude virtual/pseudo filesystems from disk metrics
squashfs loop mounts (snap packages) are always 100% full by design and
were skewing the max disk usage shown in the UI. Now filters the same
set of pseudo-filesystems that 'df' excludes by default, plus any
/dev/loop* devices regardless of fstype.
2026-02-25 14:57:16 +10:00
Joel Male c9f6f282a6 feat: AUTO_UPDATE config option, null next_update_check when disabled
- AUTO_UPDATE=false in config file disables auto-updating
- --no-auto-update flag still works as an override
- next_update_check is omitted from pulses when auto-update is disabled
- status command shows auto-update enabled/disabled state
- config.example documents the new option
2026-02-25 14:54:07 +10:00
Joel Male ac607c2757 fix: always emit timestamps in UTC to avoid timezone offset issues 2026-02-25 14:51:29 +10:00
Joel Male 7321689cc4 fix: status re-execs with sudo when not running as root 2026-02-25 14:50:07 +10:00
Joel Male 31bd3c35ab feat: include next_update_check timestamp in every pulse payload 2026-02-25 14:48:12 +10:00
Joel Male e2889617fc feat: add status, uninstall commands and collector_version in pulses
- 'pulsewise-collector status' shows hostname, masked token, API endpoint,
  service running state (systemd/launchd), and last pulse timestamp
- 'pulsewise-collector uninstall' stops the service, removes the unit file,
  config dir, log file, and binary; prompts for confirmation, requires root
- State file written to /etc/pulsewise-collector/state (or ~/.config fallback)
  after each successful send to power the 'last pulse' display
- collector_version field added to every metrics payload so the server can
  surface update prompts per-host
2026-02-25 14:44:14 +10:00
Joel Male 35f8ee5347 feat: version/update subcommands, VERSION file, deploy version bumping
- Add VERSION file as canonical version source
- build.sh reads VERSION file automatically, injects via -ldflags
- deploy.sh prompts for major/minor/patch bump, injects version via
  ldflags into all 4 builds, and writes release/latest JSON file
- Add 'pulsewise-collector version' — prints version and checks for update
- Add 'pulsewise-collector update' — fetches and applies the latest release
- Default version changed to "dev" for local builds without ldflags
2026-02-25 14:40:47 +10:00
Joel Male c2241e8d87 feat: add auto-update with --no-auto-update flag
Collector now checks for updates at startup (after 30s) and every 6h.
When a newer version is detected via the /collector/release/latest endpoint,
it downloads the new binary, atomically replaces itself, then re-execs
in-place so the service manager sees no interruption.

Auto-update is enabled by default; pass --no-auto-update to disable.
Version is injected at build time via -ldflags for release builds.
2026-02-25 14:36:42 +10:00
Joel Male 4aa08d0ef4 feat: full collector with macOS support, metrics, and one-click installer
- Collect CPU, memory, swap, disk, disk I/O, network (per-second rates),
  load average, system info, uptime, and top processes via gopsutil
- Install script supports both Linux (systemd) and macOS (launchd)
- Auto-detect OS and architecture for binary download
- Accept TOKEN env var for non-interactive installs
- Config at /etc/pulsewise-collector/config with simple KEY=VALUE format
- Debug mode logs full response body
- Hostname auto-detected if not set in config
2026-02-15 16:04:57 +10:00