Add multi-server system monitor with agent/dashboard architecture
Single Flask codebase runs in agent mode (serves /api/stats from local /proc) or dashboard mode (aggregates local + remote agents). Currently monitors compute1 (64-core, podman container) and console (16-core, bare systemd service). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
23
run.sh
Executable file
23
run.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd ~/sysmon
|
||||
|
||||
echo "Building sysmon container..."
|
||||
podman build -t sysmon .
|
||||
|
||||
echo "Stopping existing container (if any)..."
|
||||
podman stop sysmon 2>/dev/null || true
|
||||
podman rm sysmon 2>/dev/null || true
|
||||
|
||||
echo "Starting sysmon dashboard on port 8083..."
|
||||
podman run -d \
|
||||
--name sysmon \
|
||||
-p 8083:8083 \
|
||||
--security-opt label=disable \
|
||||
-v /proc:/host/proc:ro \
|
||||
-e SYSMON_SERVERS="compute1:local,console:http://192.168.88.5:8083" \
|
||||
--restart unless-stopped \
|
||||
sysmon
|
||||
|
||||
echo "Done. Dashboard at http://$(hostname):8083"
|
||||
Reference in New Issue
Block a user