1.2 KiB
1.2 KiB
Architecture
Components
cmd/pxmon: main CLI and TUI entrypoint.cmd/pxmon-agent: node-side agent binary.internal/cli: command parsing, TUI, bot integration, UX flows.internal/cluster: cluster model/store/service, SSH operations, alerts, reports, backup/runbooks/scheduler.internal/history: metrics history stores and chart helpers.internal/agent: agent API server and stats collection types.
Data model
- Registry is encrypted and stored locally.
- Default path:
<user-config-dir>/pxmon/clusters.enc - Master key path defaults to
<user-config-dir>/pxmon/master.key - Supports environment overrides:
PXMON_CONFIGPXMON_MASTER_KEY
Runtime flow
- User invokes CLI/TUI command.
internal/cliresolves cluster selector and command flags.internal/cluster.Serviceperforms SSH/agent calls.- Results are rendered in CLI tables/JSON or TUI panels.
- Optional telemetry/history snapshots are persisted for trends.
Security model
- Local registry encryption with a generated master key.
- Locker subsystem can block operational commands until unlock.
- Config export/import supports passphrase-protected bundles.