Auch verfügbar in: DE Deutsch

Glances Integration

Inhalt

Glances is a Python-based system monitoring tool that exposes a REST API. Mesh uses it to feed the server cards (InfraNodes) on the dashboard with live CPU, RAM and load values.

Why Glances and not Unraid GraphQL?

Unraid's GraphQL API only delivers static info: CPU model, cores, total RAM, array size. Live CPU % and live RAM % are not available there. Glances fills the gap and works on any Linux/macOS/Windows host — not just Unraid.

Installation on Unraid

Directly in the Apps tab:

  1. Search for "glances" → choose the template by Roxedus or SelfhostedPro → Install
  2. Keep defaults, only check:
    • Network Type: Host (required! otherwise no network/hostname stats)
    • WebUI Port: 61208
    • /var/run/docker.sock: read-only mount (for container list)
  3. Apply

Test in browser: http://<server-ip>:61208 → Glances web UI appears.

Installation via console (any Linux host)

docker run -d \
  --name=Glances \
  --restart=unless-stopped \
  --network=host \
  --pid=host \
  -e TZ=Europe/Berlin \
  -e GLANCES_OPT="-w" \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  nicolargo/glances:latest-full
  • --network=host → sees real interfaces (br0, eth0…)
  • --pid=host → correct process/load stats for the host
  • -e GLANCES_OPT="-w" → web mode on port 61208
  • :latest-full → includes NVML (NVIDIA GPU stats) and sensors library

Adding to Mesh

  1. Admin → Integrations → Glances → "Add"
    • Label: e.g. "Glances Core"
    • URL: http://<server-ip>:61208
    • (optional: username/password if behind auth)
  2. Repeat per server (e.g. "Glances Node")
  3. Admin → Content → Server Cards → for each InfraNode select the matching Glances instance under "Glances Link"
  4. Save → after ~5–10 seconds the blue CPU and RAM bars appear on the dashboard

What you then see

  • CPU bar with live % (yellow above 85 %)
  • RAM bar with live % + used/total GB
  • Array bar comes from Unraid GraphQL (static)
  • Hostname in the sub-line from Glances
  • OS version from Glances (Linux 6.12.x-Unraid)

Troubleshooting

"Live utilisation n/a — install Glances"

The fallback text. Means: no glancesRef set on the InfraNode or Glances container not reachable. Test:

curl http://<server-ip>:61208/api/4/cpu | head -c 100

CPU/RAM % are 0 or constant

Check whether Glances is running with --pid=host. Without this flag the container only sees its own processes, not the host.

NVIDIA GPU stats missing

Prerequisites:

  1. NVIDIA driver + nvidia-container-runtime on the host
  2. Glances with :latest-full (or custom build with NVML)
  3. Add --gpus all to the docker run command
  4. Optional: lm-sensors installed on the host (for CPU temperature)

DNS error on image pull

Classic issue on freshly set-up Unraid nodes: DNS server is set to 1.1.1.1 but UDM/router blocks outbound:53. Fix: Settings → Network Settings → DNS Server to 192.168.x.x (router) or 8.8.8.8.

API endpoints Mesh reads

Directly queryable with curl for debugging:

Endpoint Returns
/api/4/status Glances version (health probe)
/api/4/cpu total %, user %, system %, idle %
/api/4/mem total, available, used, percent (bytes)
/api/4/system hostname, os_name, os_version, hr_name
/api/4/load (mid-term) min1 / min5 / min15 — planned for v1.6
/api/4/diskio read/write bytes/s — planned for v1.6

More data on server cards?

The /api/4/... endpoints deliver much more (disk I/O, network throughput, top processes, sensors). Roadmap v1.6 plans:

  • Load average as chip
  • Disk I/O (R/W MB/s) as chip
  • Network throughput on the primary interface
  • CPU temperature (via sensors)
  • Mini sparkline for CPU over the last 60 seconds