ArgusSyS is a small Node.js service that:
- serves a JSON stats endpoint at
/stats - serves a static web UI from
/ - optionally runs and schedules speed tests
- stores a small server-side history ring buffer (shared by all clients)
GPU support: the container image is intended for NVIDIA GPUs via
nvidia-smi. If NVIDIA drivers / NVIDIA Container Toolkit are not available, the API will still run, but GPU fields will benull/n/a.
- Docker Engine + Docker Compose
- (Optional, for GPU metrics) NVIDIA GPU + NVIDIA drivers on the host
- (Optional, for GPU metrics inside containers) NVIDIA Container Toolkit (so Docker can pass GPUs through)
If you run without NVIDIA support, everything except the GPU section should still work.
TAG=$(curl -fsSL https://api.github.com/repos/G-grbz/argusSyS/releases/latest | grep -m1 '"tag_name"' | cut -d '"' -f4) && curl -fsSL -L "https://github.com/G-grbz/argusSyS/archive/refs/tags/${TAG}.zip" -o argus.zip && unzip -q argus.zip && cd argusSyS-*
docker compose up -d --build- UI:
http://<host>:3012/ - API:
http://<host>:3012/stats - Health:
http://<host>:3012/health
This is a generic template. By default it runs without NVIDIA.
If you want NVIDIA GPU metrics, uncomment the gpus: line and the NVIDIA_* environment variables.
services:
argussys:
container_name: argussys
build: .
# If you need host-level visibility (e.g. /proc, /sys), you may enable these.
# Remove them if you prefer a stricter container.
privileged: true
pid: host
network_mode: host
working_dir: /app
command: ["node", "stats-api.js"]
# NVIDIA (optional). If you have NVIDIA + NVIDIA Container Toolkit, uncomment these:
# gpus: all
environment:
TZ: Europe/Istanbul
PORT: "3012"
# Comma-separated list of mountpoints the API should report (df).
# IMPORTANT: if running in a container, each path here must be mounted into the container.
DISK_PATHS: "/host"
# UI
UI_DIR: "/app/ui"
UI_INDEX: "index.html"
# NVIDIA runtime hints (optional)
# NVIDIA_VISIBLE_DEVICES: "all"
# NVIDIA_DRIVER_CAPABILITIES: "compute,utility,video"
# Speedtest
SPEEDTEST_TIMEOUT_MS: "120000"
SPEEDTEST_INTERVAL_MIN: "0" # 0 = disabled (manual only)
SPEEDTEST_RUN_ON_START: "1" # 1 = run once on startup
SPEEDTEST_STATE_FILE: "/app/data/speedtest-state.json"
# History
HISTORY_MAX_MIN: "120"
volumes:
- ./:/app
# Host visibility (optional)
- /sys:/sys:ro
- /:/host:ro
# Persist app data
- ./data:/app/data
# Serve UI from repo
- ./ui:/app/ui:ro
restart: unless-stoppednetwork_mode: hostmakes the UI/API available on the host network without port mapping. If you prefer bridge networking, removenetwork_mode: hostand addports: ["3012:3012"].- If you disable
privileged/pid: host, some host-level detection may be reduced. - For
DISK_PATHS, every listed path should be mounted in the container, otherwise the API may report it as βnot mounted on hostβ.
PORT(default:3012) β HTTP server portTZβ timezone used for formatting (recommended)
UI_DIR(default:./ui) β directory containing static UI filesUI_INDEX(default:index.html) β index file name
DISK_PATHS(default:/) β comma-separated mountpoints to report withdfand I/O stats
GPU_POLL_MS(default:1000) β GPU polling periodGPU_TIMEOUT_MS(default:1000) β timeout fornvidia-smicalls
NVIDIA-only: GPU stats use
nvidia-smi. On systems without NVIDIA, the GPU block will be missing /null.
HISTORY_SAMPLE_MS(default:1000) β sampling intervalHISTORY_MAX_MIN(default:120) β maximum history windowHISTORY_DB_PATH(default:./data/history_state.json) β persisted history file
SPEEDTEST_TIMEOUT_MS(default:120000) β per-run timeoutSPEEDTEST_INTERVAL_MIN(default:0) β schedule interval in minutes (0disables scheduling)SPEEDTEST_RUN_ON_START(default:0/1) β run once on bootSPEEDTEST_STATE_FILE(default:/app/data/speedtest-state.json) β persisted state file
GET /statsβ full stats payload (includessystem,cpu,mem,net,gpu,disks, andhistory)GET /healthβ health check
GET /stats/speedtest/lastβ last speedtest snapshotGET /stats/speedtest/runβ trigger a speedtest runGET /stats/speedtest/config?interval=<minutes>β set interval (minutes)GET /stats/speedtest/historyβ 24h speedtest history
-
Confirm
nvidia-smiworks on the host. -
If you want GPU metrics inside Docker:
- install NVIDIA Container Toolkit on the host
- ensure your Compose file includes
gpus: all - keep
NVIDIA_VISIBLE_DEVICES=all
If you are not using NVIDIA, remove the gpus: line and the NVIDIA_* environment variables.
When running in a container, each path in DISK_PATHS must be a real mountpoint on the host and be mounted into the container at the same path.
Run locally:
npm install
node stats-api.jsThen open http://localhost:3012/.
MIT
