staxmonitor documentation
Choose a version
Version 0.1.x
StaxMonitor Install and Run #
StaxMonitor ships an agent (runs on each monitored host) and a console (the self-hosted control plane). Install both from npm, or use standalone binaries for air-gapped hosts.
Install from npm #
npm install -g staxmonitor
This exposes the staxmonitor command with two subcommands: agent and
console.
Install from a standalone binary #
Download staxmonitor-<platform>-<arch> from
GitHub Releases, place it
on your PATH, and make it executable. No Node.js install is required — the
binary is self-contained. This is the recommended path for
air-gapped hosts.
Start the console #
staxmonitor console \
--port 4980 \
--secret "<shared-secret>" \
--persist ~/.staxmonitor/state.json \
--routing routing.json
--secretmust match the agent’ssecret; without it, the console accepts unsigned payloads (not recommended in production).--persistkeeps the latest snapshots across restarts.--routingpoints to a JSON file mapping channel names (webhook/slack/email) to targets. See deployment.
Open http://<console-host>:4980/ for the multi-host dashboard.
Configure and start an agent #
Create ~/.staxmonitor/config.json (or pass --config path):
{
"agentId": "web-01",
"consoleUrl": "http://console.internal:4980",
"secret": "<shared-secret>",
"interval": 15,
"disks": ["/"],
"services": [{ "kind": "process", "name": "nginx" }],
"rules": [
{ "name": "High CPU", "metric": "cpu.usage", "op": "gt", "threshold": 90, "channels": ["slack"] }
]
}
staxmonitor agent
The agent reports every interval seconds. Rules are evaluated locally; when
one fires, the report carries the alert and the console routes it.
You can also set the same values via environment variables prefixed
STAXMONITOR_ (e.g. STAXMONITOR_CONSOLE_URL, STAXMONITOR_SECRET).
Limitations (MVP) #
- The console has no UI/login auth beyond the shared signing secret. Put it behind your network access controls.
- Email alerts go through an external
relayUrl, not native SMTP. - The agent does not buffer offline; reporting is best-effort.
- “Air-gapped” is supported by offline binary distribution and the self-hosted console, but signed-binary verification is simplified in this release.