Add dashboard summary view, server detail routing, and VM listing
Rearchitect to pure aggregator dashboard (no /proc) with bare agents on each host. Agents report VM data via sudo virsh (cached 10s). UI rewritten with hash-based routing: summary card grid and per-server detail view with CPU grid, memory, load, uptime, and VM table. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
set -e
|
||||
|
||||
HOST="${1:-console}"
|
||||
PORT="${2:-8083}"
|
||||
|
||||
echo "Deploying sysmon agent to $HOST..."
|
||||
echo "Deploying sysmon agent to $HOST on port $PORT..."
|
||||
|
||||
# Create directory and copy app
|
||||
ssh "$HOST" 'mkdir -p ~/sysmon-agent/templates'
|
||||
@@ -11,7 +12,7 @@ scp ~/sysmon/app.py "$HOST":~/sysmon-agent/
|
||||
scp ~/sysmon/templates/index.html "$HOST":~/sysmon-agent/templates/
|
||||
|
||||
# Install dependencies and set up systemd service
|
||||
ssh "$HOST" bash <<'REMOTE'
|
||||
ssh "$HOST" PORT="$PORT" bash <<'REMOTE'
|
||||
set -e
|
||||
|
||||
pip3 install --break-system-packages --quiet flask gunicorn 2>/dev/null || \
|
||||
@@ -28,7 +29,7 @@ Type=simple
|
||||
User=kamaji
|
||||
WorkingDirectory=/home/kamaji/sysmon-agent
|
||||
Environment=SYSMON_PROC=/proc
|
||||
ExecStart=/home/kamaji/.local/bin/gunicorn -b 0.0.0.0:8083 -w 1 --threads 2 app:app
|
||||
ExecStart=/usr/bin/python3 -m gunicorn -b 0.0.0.0:${PORT} -w 1 --threads 2 app:app
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
@@ -45,4 +46,4 @@ sudo systemctl status sysmon-agent --no-pager -l
|
||||
REMOTE
|
||||
|
||||
echo ""
|
||||
echo "Verify: curl http://$HOST:8083/api/stats"
|
||||
echo "Verify: curl http://$HOST:$PORT/api/stats"
|
||||
|
||||
Reference in New Issue
Block a user