monitor-agent-nvidia

monitor-agent-nvidia

Docker app from ImFascinated's Repository

Overview

Monitor Agent pushes host metrics (CPU, memory, network, array disks, ZFS pools, Docker containers, and NVIDIA GPU stats via nvidia-smi) to your Monitor dashboard. Requires an ingest token from https://monitor.fascinated.cc Install the Unraid NVIDIA Driver plugin before using this template. This image uses the NVIDIA Container Toolkit (--runtime=nvidia --gpus=all) so nvidia-smi and driver libraries match your host. For AMD or Intel GPUs, use the default monitor-agent template instead (sysfs, no NVIDIA runtime).

Monitor Agent

Lightweight host metrics agent for Monitor.

Install (Linux)

curl -fsSL https://raw.githubusercontent.com/RealFascinated/Monitor-Agent/master/install.sh | sudo bash -s -- install YOUR_INGEST_TOKEN

Windows

Run this from an Administrator PowerShell to download and install the agent as a background service:

Set-ExecutionPolicy Bypass -Scope Process -Force; & ([ScriptBlock]::Create((iwr https://raw.githubusercontent.com/RealFascinated/Monitor-Agent/master/install.ps1 -UseBasicParsing).Content)) install YOUR_INGEST_TOKEN

To uninstall:

Set-ExecutionPolicy Bypass -Scope Process -Force; & ([ScriptBlock]::Create((iwr https://raw.githubusercontent.com/RealFascinated/Monitor-Agent/master/install.ps1 -UseBasicParsing).Content)) uninstall

This writes config.yml to %ProgramData%\MonitorAgent, registers a monitor-agent service via NSSM, and logs to agent.log in the same folder.

Note: The agent must run as Administrator so hardware sensors (including GPU power) can be read.

Building from source: (save install.ps1 locally or use the one-liner above with -BinaryPath)

.\scripts\build-lhm.ps1
go build -tags lhmbundle -o monitor-agent.exe ./cmd/main.go
.\install.ps1 install YOUR_INGEST_TOKEN -BinaryPath .\monitor-agent.exe

The Windows build bundles LibreHardwareMonitorLib for CPU, memory, temperatures, and GPU sensors (see licenses/LibreHardwareMonitor/NOTICE.md).

Configuration

A config file is optional. Provide settings in config.yml (see config-example.yml) or entirely via environment variables. Environment variables override values from the file.

Each YAML key maps to an environment variable: MONITOR_ + the key in uppercase (e.g. ingest_tokenMONITOR_INGEST_TOKEN). New fields added to config-example.yml follow the same rule automatically.

Config key Default Description
config_file (MONITOR_CONFIG_FILE) config.yml if present; - skips the file Config path
ingest_token (required) Monitor ingest token
api_endpoint https://monitor.fascinated.cc/api/v1/servers/ingest Ingest URL
push_schedule */15 * * * * * Cron with seconds (6 fields)
enable_docker true Docker container stats (Linux)
enable_gpu true GPU metrics collection

Other runtime variables: MONITOR_HOST_ROOT (host root bind mount prefix for disk metrics in containers), MONITOR_LOG_LEVEL (debug, info, warn, error), MONITOR_PROFILE_COLLECT=1 (log per-phase collection timings at debug level).

Boolean config env vars accept true/false, 1/0, yes/no, or on/off.

If config.yml is missing and MONITOR_CONFIG_FILE is not set, the agent starts using environment variables only. If MONITOR_CONFIG_FILE points at a path, that file must exist.

Print one payload (debug)

Print one metrics payload as indented JSON to stdout (no ingest token required):

./monitor-agent print

Logs still go to stderr.

GPU metrics

Each GPU is reported in gpuMetrics with a stable deviceId (16-character hex hash of the platform identifier), plus name, vendor, and optional usage, VRAM, temperature, and power fields.

Platform Source
Windows LibreHardwareMonitor (NVIDIA, AMD, Intel)
Linux — NVIDIA nvidia-smi (host binary via NVIDIA Container Toolkit in the :nvidia Docker image)
Linux — AMD / Intel DRM sysfs (amdgpu, i915, xe)

Set enable_gpu: false or MONITOR_ENABLE_GPU=false to disable.

Unraid

Install a Docker template on Unraid:

# AMD / Intel GPU, or no discrete NVIDIA GPU
wget -O /boot/config/plugins/dockerMan/templates-user/monitor-agent.xml \
  https://raw.githubusercontent.com/RealFascinated/Monitor-Agent/master/unraid/monitor-agent.xml

# NVIDIA GPU (requires the Unraid NVIDIA Driver plugin)
wget -O /boot/config/plugins/dockerMan/templates-user/monitor-agent-nvidia.xml \
  https://raw.githubusercontent.com/RealFascinated/Monitor-Agent/master/unraid/monitor-agent-nvidia.xml

Then open Docker → Add Container, choose monitor-agent or monitor-agent-nvidia, enter your Ingest Token, and apply. Defaults mount the host /proc, /sys, /dev, array root at /host, and the Docker socket for full metrics on Unraid (including /mnt/* shares and ZFS).

Docker

On Linux, container CPU and memory are collected from cgroup sysfs (/sys/fs/cgroup) when available — the same approach Netdata uses. Mount the host cgroup filesystem and optionally /var/run/docker.sock for human-readable container names. The agent falls back to docker stats only when no Docker cgroups are found.

Images are published to GitHub Container Registry on each agent/v* release tag:

ghcr.io/realfascinated/monitor-agent

Image Dockerfile Use when
:latest, :master, :VERSION Dockerfile Default — small Alpine image; AMD and Intel GPU via sysfs
:nvidia, :nvidia-master, :VERSION-nvidia Dockerfile.nvidia NVIDIA GPU hosts with the NVIDIA Container Toolkit

The default image does not include nvidia-smi. The NVIDIA image uses an Ubuntu + CUDA base (glibc); run with gpus: all so the toolkit injects nvidia-smi and host-matched driver libraries.

Build locally:

docker build -t monitor-agent .
docker build -f Dockerfile.nvidia -t monitor-agent:nvidia .

Example docker-compose.yml (default — AMD / Intel / no discrete NVIDIA)

services:
  monitor-agent:
    image: ghcr.io/realfascinated/monitor-agent:latest
    container_name: monitor-agent
    restart: unless-stopped
    privileged: true
    pid: host
    network_mode: host
    environment:
      MONITOR_CONFIG_FILE: "-"
      MONITOR_INGEST_TOKEN: your-ingest-token
      MONITOR_API_ENDPOINT: https://monitor.fascinated.cc/api/v1/servers/ingest
      MONITOR_PUSH_SCHEDULE: "*/15 * * * * *"
      MONITOR_ENABLE_DOCKER: "true"
      MONITOR_ENABLE_GPU: "true"
      MONITOR_HOST_ROOT: /host
    volumes:
      - /:/host:ro,rslave
      - /proc:/proc:ro
      - /sys:/sys:ro
      - /dev:/dev:ro
      - /etc/os-release:/etc/os-release:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro

Example docker-compose.yml (NVIDIA)

Same as above, but use the NVIDIA image and pass GPUs:

services:
  monitor-agent:
    image: ghcr.io/realfascinated/monitor-agent:nvidia
    gpus: all
    # ... same privileged, pid, network_mode, environment, and volumes as above

Alternatively, mount a config file instead of using env vars:

    environment:
      MONITOR_CONFIG_FILE: /etc/monitor-agent/config.yml
    volumes:
      - ./config.yml:/etc/monitor-agent/config.yml:ro

Releases

Tagged releases use the prefix agent/vMAJOR.MINOR.PATCH (for example agent/v2.0.1). Pushing a tag builds GitHub release binaries and publishes both Docker images (default and -nvidia) to GHCR.

Install monitor-agent-nvidia on Unraid in a few clicks.

Find monitor-agent-nvidia in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for monitor-agent-nvidia Review the template variables and paths Click Install

Requirements

Monitor ingest token. Unraid NVIDIA Driver plugin. Docker must be enabled on the host for container metrics.

Categories

Related apps

Explore more like this

Explore all

Details

Repository
ghcr.io/realfascinated/monitor-agent:nvidia-latest
Last Updated2026-07-17
First Seen2026-05-31

Runtime arguments

Web UI
https://monitor.fascinated.cc
Network
host
Shell
sh
Privileged
true
Extra Params
--pid=host --runtime=nvidia --gpus=all

Template configuration

Ingest TokenVariable

Ingest token from your Monitor server settings (required).

Target
MONITOR_INGEST_TOKEN
API EndpointVariable

Monitor ingest API URL.

Target
MONITOR_API_ENDPOINT
Default
https://monitor.fascinated.cc/api/v1/servers/ingest
Value
https://monitor.fascinated.cc/api/v1/servers/ingest
Push ScheduleVariable

Cron schedule with seconds field (default: every 15 seconds).

Target
MONITOR_PUSH_SCHEDULE
Default
*/15 * * * * *
Value
*/15 * * * * *
Enable Docker StatsVariable

Collect per-container CPU and memory from the host Docker daemon.

Target
MONITOR_ENABLE_DOCKER
Default
true
Value
true
Log LevelVariable

Agent log level: debug, info, warn, or error.

Target
MONITOR_LOG_LEVEL
Default
info
Value
info
TimezoneVariable

Timezone (e.g. America/New_York). Leave empty to use the Unraid system timezone.

Target
TZ
Config FileVariable

Set to - to configure via environment variables only.

Target
MONITOR_CONFIG_FILE
Default
-
Value
-
Host Root PrefixVariable

Path prefix for host disk metrics (must match the Host Root volume target).

Target
MONITOR_HOST_ROOT
Default
/host
Value
/host
Host RootPathro

Host filesystem (read-only) for disk usage on array shares and ZFS mount points.

Target
/host
Default
/
Value
/
Host /procPathro

Host procfs for CPU, memory, load, and network metrics.

Target
/proc
Default
/proc
Value
/proc
Host /sysPathro

Host sysfs.

Target
/sys
Default
/sys
Value
/sys
Host /devPathro

Host devices for disk I/O and ZFS (zpool).

Target
/dev
Default
/dev
Value
/dev
Host OS ReleasePathro

Host OS identification.

Target
/etc/os-release
Default
/etc/os-release
Value
/etc/os-release
Docker SocketPathro

Docker socket for container statistics.

Target
/var/run/docker.sock
Default
/var/run/docker.sock
Value
/var/run/docker.sock